try to make goimports happy

pull/3734/head
Peter Chung 3 years ago
parent 84bb6f405d
commit eaf70027e8
  1. 6
      cmd/harmony/flags.go
  2. 18
      cmd/harmony/flags_test.go
  3. 2
      internal/configs/harmony/harmony.go

@ -997,9 +997,9 @@ var (
DefValue: defaultConfig.Log.Verbosity,
}
logVerbosePrintsFlag = cli.StringSliceFlag{
Name: "log.verbose-prints",
Usage: "debugging feature. to print verbose internal objects as JSON in log file. available internal objects: config",
DefValue: []string{},
Name: "log.verbose-prints",
Usage: "debugging feature. to print verbose internal objects as JSON in log file. available internal objects: config",
DefValue: []string{},
}
// TODO: remove context (this shall not be in the log)
logContextIPFlag = cli.StringFlag{

@ -827,16 +827,16 @@ func TestLogFlags(t *testing.T) {
VerbosePrints: harmonyconfig.LogVerbosePrints{
Config: true,
},
Context: nil,
Context: nil,
},
},
{
args: []string{"--log.ctx.ip", "8.8.8.8", "--log.ctx.port", "9001"},
expConfig: harmonyconfig.LogConfig{
Folder: defaultConfig.Log.Folder,
FileName: defaultConfig.Log.FileName,
RotateSize: defaultConfig.Log.RotateSize,
Verbosity: defaultConfig.Log.Verbosity,
Folder: defaultConfig.Log.Folder,
FileName: defaultConfig.Log.FileName,
RotateSize: defaultConfig.Log.RotateSize,
Verbosity: defaultConfig.Log.Verbosity,
VerbosePrints: defaultConfig.Log.VerbosePrints,
Context: &harmonyconfig.LogContext{
IP: "8.8.8.8",
@ -848,10 +848,10 @@ func TestLogFlags(t *testing.T) {
args: []string{"--log_folder", "latest_log", "--log_max_size", "10", "--verbosity",
"5", "--ip", "8.8.8.8", "--port", "9001"},
expConfig: harmonyconfig.LogConfig{
Folder: "latest_log",
FileName: "validator-8.8.8.8-9001.log",
RotateSize: 10,
Verbosity: 5,
Folder: "latest_log",
FileName: "validator-8.8.8.8-9001.log",
RotateSize: 10,
Verbosity: 5,
VerbosePrints: defaultConfig.Log.VerbosePrints,
Context: &harmonyconfig.LogContext{
IP: "8.8.8.8",

@ -96,7 +96,7 @@ type LogConfig struct {
RotateSize int
Verbosity int
VerbosePrints LogVerbosePrints
Context *LogContext `toml:",omitempty"`
Context *LogContext `toml:",omitempty"`
}
type LogVerbosePrints struct {

Loading…
Cancel
Save