MCPcopy
hub / github.com/OpenListTeam/OpenList / GetInt

Function GetInt

internal/setting/setting.go:20–26  ·  view source on GitHub ↗
(key string, defaultVal int)

Source from the content-addressed store, hash-verified

18}
19
20func GetInt(key string, defaultVal int) int {
21 i, err := strconv.Atoi(GetStr(key))
22 if err != nil {
23 return defaultVal
24 }
25 return i
26}
27
28func GetBool(key string) bool {
29 return GetStr(key) == "true" || GetStr(key) == "1"

Callers 12

InitMethod · 0.92
RunMethod · 0.92
SignArchiveFunction · 0.92
SignFunction · 0.92
initLimiterFunction · 0.92
InitTaskManagerFunction · 0.92
tryLoginFunction · 0.92
AuthUserMethod · 0.92
PasswordAuthMethod · 0.92
BuildIndexFunction · 0.92
autoRegisterFunction · 0.92
LdapRegisterFunction · 0.92

Calls 1

GetStrFunction · 0.70

Tested by

no test coverage detected