MCPcopy Create free account
hub / github.com/ethstorage/es-node / ReadCLIConfig

Function ReadCLIConfig

ethstorage/log/cli.go:63–73  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

61}
62
63func ReadCLIConfig(ctx *cli.Context) CLIConfig {
64 cfg := CLIConfig{
65 Level: ctx.GlobalString(LevelFlagName),
66 Format: ctx.GlobalString(FormatFlagName),
67 Color: ctx.GlobalBool(ColorFlagName),
68 }
69 if err := cfg.check(); err != nil {
70 panic(err)
71 }
72 return cfg
73}
74
75func levelFromString(lvlString string) (slog.Level, error) {
76 lvlString = strings.ToLower(lvlString) // ignore case

Callers 1

EsNodeMainFunction · 0.92

Calls 1

checkMethod · 0.95

Tested by

no test coverage detected