MCPcopy Create free account
hub / github.com/caseymrm/menuet / String

Method String

userdefaults.go:54–64  ·  view source on GitHub ↗

String gets a string default, "" if not set

(key string)

Source from the content-addressed store, hash-verified

52
53// String gets a string default, "" if not set
54func (u *UserDefaults) String(key string) string {
55 val, ok := u.strings[key]
56 if ok {
57 return val
58 }
59 ckey := C.CString(string(key))
60 cvalue := C.getString(ckey)
61 value := C.GoString(cvalue)
62 C.free(unsafe.Pointer(ckey))
63 return value
64}
65
66// SetInteger sets an integer default
67func (u *UserDefaults) SetInteger(key string, value int) {

Callers 9

UnmarshalMethod · 0.95
renderLaunchdPlistFunction · 0.80
RenderFunction · 0.80
joinVarsFunction · 0.80
renderRunFunction · 0.80
shortcutStringFunction · 0.80
setWeatherFunction · 0.80
menuItemsFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected