LayerString outputs an individual layer as a string. The layer is output in a single line, with no trailing newline. This function is specifically designed to do the right thing for most layers... it follows the following rules: * If the Layer has a String function, just output that. * Otherwise,
(l Layer)
| 214 | // Payload layer and it's internal 'data' field, which contains a large byte |
| 215 | // array that would really mess up formatting. |
| 216 | func LayerString(l Layer) string { |
| 217 | return fmt.Sprintf("%v\t%s", l.LayerType(), layerString(reflect.ValueOf(l), false, false)) |
| 218 | } |
| 219 | |
| 220 | // Dumper dumps verbose information on a value. If a layer type implements |
| 221 | // Dumper, then its LayerDump() string will include the results in its output. |
searching dependent graphs…