"github.com/rivo/tview"
"github.com/stretchr/testify/mock"
"go.uber.org/zap"
- "gopkg.in/yaml.v2"
+ "gopkg.in/yaml.v3"
"math/big"
"math/rand"
"net"
prefs := ClientPrefs{}
decoder := yaml.NewDecoder(fh)
- decoder.SetStrict(true)
if err := decoder.Decode(&prefs); err != nil {
return nil, err
}
prefs, err := readConfig(cfgPath)
if err != nil {
- fmt.Printf("unable to read config file %s", cfgPath)
- os.Exit(1)
+ logger.Fatal(fmt.Sprintf("unable to read config file %s\n", cfgPath))
}
c.pref = prefs
return db.TextView.Write(p)
}
-// Sync is a noop function that exists to satisfy the zapcore.WriteSyncer interface
+// Sync is a noop function that dataFile to satisfy the zapcore.WriteSyncer interface
func (db *DebugBuffer) Sync() error {
return nil
}
NewField(fieldUserIconID, c.pref.IconBytes()),
NewField(fieldUserLogin, negateString([]byte(login))),
NewField(fieldUserPassword, negateString([]byte(password))),
- NewField(fieldVersion, []byte{0, 2}),
),
)
}