mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
fix dev scripts.
This commit is contained in:
parent
f65f262d48
commit
ae117ccdbb
@ -22,6 +22,10 @@ if [ -z $NEKO_NAT1TO1 ]; then
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $NEKO_NAT1TO1 ]; then
|
||||
NEKO_NAT1TO1=$(hostname -I 2>/dev/null | awk '{print $1}')
|
||||
fi
|
||||
|
||||
if [ -z $NEKO_NAT1TO1 ]; then
|
||||
NEKO_NAT1TO1=$(hostname -i 2>/dev/null)
|
||||
fi
|
||||
|
@ -3,8 +3,14 @@ package utils
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
)
|
||||
|
||||
func Decode(input interface{}, output interface{}) error {
|
||||
return mapstructure.Decode(input, output)
|
||||
}
|
||||
|
||||
func Unmarshal(in any, raw []byte, callback func() error) error {
|
||||
if err := json.Unmarshal(raw, &in); err != nil {
|
||||
return err
|
Loading…
Reference in New Issue
Block a user