MCPcopy
hub / github.com/knadh/koanf / Int

Method Int

getters.go:128–130  ·  view source on GitHub ↗

Int returns the int value of a given key path or 0 if the path does not exist or if the value is not a valid int.

(path string)

Source from the content-addressed store, hash-verified

126// Int returns the int value of a given key path or 0 if the path
127// does not exist or if the value is not a valid int.
128func (ko *Koanf) Int(path string) int {
129 return int(ko.Int64(path))
130}
131
132// MustInt returns the int value of a given key path or panics
133// if it isn't set or set to default value of 0.

Callers 15

MustIntMethod · 0.95
getFlagValueMethod · 0.80
TestLoadFunction · 0.80
TestFSProviderFunction · 0.80
TestMergeAtFunction · 0.80
TestSetFunction · 0.80
TestSlicesFunction · 0.80
TestGetTypesFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls 1

Int64Method · 0.95

Tested by 7

TestLoadFunction · 0.64
TestFSProviderFunction · 0.64
TestMergeAtFunction · 0.64
TestSetFunction · 0.64
TestSlicesFunction · 0.64
TestGetTypesFunction · 0.64