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

Function ArgumentMust

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

Source from the content-addressed store, hash-verified

24}
25
26func ArgumentMust(d map[string]interface{}, name string) string {
27 s, ok := Argument(d, name)
28 if ok {
29 return s
30 }
31 log.Panicf("option %s is required", name)
32 return ""
33}
34
35func ArgumentInteger(d map[string]interface{}, name string) (int, bool) {
36 if s, ok := Argument(d, name); ok {

Callers

nothing calls this directly

Calls 2

ArgumentFunction · 0.85
PanicfMethod · 0.80

Tested by

no test coverage detected