MCPcopy
hub / github.com/CodisLabs/codis / ArgumentIntegerMust

Function ArgumentIntegerMust

pkg/utils/args.go:46–53  ·  view source on GitHub ↗
(d map[string]interface{}, name string)

Source from the content-addressed store, hash-verified

44}
45
46func ArgumentIntegerMust(d map[string]interface{}, name string) int {
47 n, ok := ArgumentInteger(d, name)
48 if ok {
49 return n
50 }
51 log.Panicf("option %s is required", name)
52 return 0
53}

Callers

nothing calls this directly

Calls 2

ArgumentIntegerFunction · 0.85
PanicfMethod · 0.80

Tested by

no test coverage detected