Lines Matching refs:indentation
60 func Object(object interface{}, indentation uint) string {
61 indent := strings.Repeat(Indent, int(indentation))
63 return fmt.Sprintf("%s<%s>: %s", indent, formatType(object), formatValue(value, indentation))
69 func IndentString(s string, indentation uint) string {
72 indent := strings.Repeat(Indent, int(indentation))
105 func formatValue(value reflect.Value, indentation uint) string {
106 if indentation > MaxDepth {
144 return formatValue(value.Elem(), indentation)
147 return formatString(value.Bytes(), indentation)
149 return formatSlice(value, indentation)
151 return formatString(value.String(), indentation)
153 return formatSlice(value, indentation)
155 return formatMap(value, indentation)
157 return formatStruct(value, indentation)
159 return formatValue(value.Elem(), indentation)
169 func formatString(object interface{}, indentation uint) string {
170 if indentation == 1 {
191 func formatSlice(v reflect.Value, indentation uint) string {
196 result[i] = formatValue(v.Index(i), indentation+1)
203 indenter := strings.Repeat(Indent, int(indentation))
210 func formatMap(v reflect.Value, indentation uint) string {
217 result[i] = fmt.Sprintf("%s: %s", formatValue(key, 0), formatValue(value, indentation+1))
224 indenter := strings.Repeat(Indent, int(indentation))
231 func formatStruct(v reflect.Value, indentation uint) string {
240 representation := fmt.Sprintf("%s: %s", structField.Name, formatValue(fieldEntry, indentation+1))
247 indenter := strings.Repeat(Indent, int(indentation))