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

Function list_value

config.go:104–115  ·  view source on GitHub ↗
(v reflect.Value, name string, w io.Writer)

Source from the content-addressed store, hash-verified

102}
103
104func list_value(v reflect.Value, name string, w io.Writer) {
105 switch t := v; t.Kind() {
106 case reflect.Bool:
107 fmt.Fprintf(w, "%s %v\n", name, t.Bool())
108 case reflect.String:
109 fmt.Fprintf(w, "%s \"%v\"\n", name, t.String())
110 case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
111 fmt.Fprintf(w, "%s %v\n", name, t.Int())
112 case reflect.Float32, reflect.Float64:
113 fmt.Fprintf(w, "%s %v\n", name, t.Float())
114 }
115}
116
117func (this *config) list() string {
118 str, typ := this.value_and_type()

Callers 3

listMethod · 0.85
list_optionMethod · 0.85
set_optionMethod · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected