MCPcopy Create free account
hub / github.com/nsf/gocode / options

Method options

config.go:223–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223func (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}

Callers 1

server_optionsFunction · 0.80

Calls 5

value_and_typeMethod · 0.95
quotedFunction · 0.85
preprocess_descFunction · 0.85
StringMethod · 0.80
config_fileFunction · 0.70

Tested by

no test coverage detected