(v reflect.Value, name string, w io.Writer)
| 102 | } |
| 103 | |
| 104 | func 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 | |
| 117 | func (this *config) list() string { |
| 118 | str, typ := this.value_and_type() |
no test coverage detected