MCPcopy
hub / github.com/spicetify/cli / searchField

Function searchField

src/cmd/config.go:97–110  ·  view source on GitHub ↗

searchField finds requested field in all three config sections

(field string)

Source from the content-addressed store, hash-verified

95
96// searchField finds requested field in all three config sections
97func searchField(field string) *ini.Key {
98 key, err := settingSection.GetKey(field)
99 if err != nil {
100 key, err = preprocSection.GetKey(field)
101 if err != nil {
102 key, err = featureSection.GetKey(field)
103 if err != nil {
104 unchangeWarning(field, `Not a valid field.`)
105 os.Exit(1)
106 }
107 }
108 }
109 return key
110}
111
112func changeSuccess(key, value string) {
113 utils.PrintSuccess(`Config changed: ` + key + ` = ` + value)

Callers 2

DisplayConfigFunction · 0.85
toggleTypeFunction · 0.85

Calls 1

unchangeWarningFunction · 0.85

Tested by

no test coverage detected