()
| 221 | } |
| 222 | |
| 223 | func (this *config) options() string { |
| 224 | var buf bytes.Buffer |
| 225 | fmt.Fprintf(&buf, "%sConfig file location%s: %s\n", color_white_bold, color_none, config_file()) |
| 226 | dv := reflect.ValueOf(g_default_config) |
| 227 | v, t := this.value_and_type() |
| 228 | for i, n := 0, t.NumField(); i < n; i++ { |
| 229 | f := t.Field(i) |
| 230 | index := f.Index |
| 231 | tag := f.Tag.Get("json") |
| 232 | fmt.Fprintf(&buf, "\n%s%s%s\n", color_yellow_bold, tag, color_none) |
| 233 | fmt.Fprintf(&buf, "%stype%s: %s\n", color_yellow, color_none, f.Type) |
| 234 | fmt.Fprintf(&buf, "%svalue%s: %s\n", color_yellow, color_none, quoted(v.FieldByIndex(index).Interface())) |
| 235 | fmt.Fprintf(&buf, "%sdefault%s: %s\n", color_yellow, color_none, quoted(dv.FieldByIndex(index).Interface())) |
| 236 | fmt.Fprintf(&buf, "%sdescription%s: %s\n", color_yellow, color_none, preprocess_desc(g_config_desc[tag])) |
| 237 | } |
| 238 | |
| 239 | return buf.String() |
| 240 | } |
no test coverage detected