Beispiel #1
0
func op(v interface{}) {
	buf, _ := ogdl.MarshalIndent(v, "    ", "    ")
	typ := ""
	if v != nil {
		typ = reflect.TypeOf(v).String() + "\n"
	}
	fmt.Println("\n" +
		typ +
		string(buf))
}
Beispiel #2
0
func flowPrint(v interface{}) string {
	buf, _ := flow.MarshalIndent(v, "    ", "    ")
	typ := ""
	if v != nil {
		typ = reflect.TypeOf(v).String() + "\n"
	}
	return "\n" +
		typ +
		string(buf) +
		"\n"
}