searchField finds requested field in all three config sections
(field string)
| 95 | |
| 96 | // searchField finds requested field in all three config sections |
| 97 | func 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 | |
| 112 | func changeSuccess(key, value string) { |
| 113 | utils.PrintSuccess(`Config changed: ` + key + ` = ` + value) |
no test coverage detected