fdump is a helper function to consolidate the logic from the various public methods which take varying writers and config states.
(cs *ConfigState, w io.Writer, a ...interface{})
| 451 | // fdump is a helper function to consolidate the logic from the various public |
| 452 | // methods which take varying writers and config states. |
| 453 | func fdump(cs *ConfigState, w io.Writer, a ...interface{}) { |
| 454 | for _, arg := range a { |
| 455 | if arg == nil { |
| 456 | w.Write(interfaceBytes) |
| 457 | w.Write(spaceBytes) |
| 458 | w.Write(nilAngleBytes) |
| 459 | w.Write(newlineBytes) |
| 460 | continue |
| 461 | } |
| 462 | |
| 463 | d := dumpState{w: w, cs: cs} |
| 464 | d.pointers = make(map[uintptr]int) |
| 465 | d.dump(reflect.ValueOf(arg)) |
| 466 | d.w.Write(newlineBytes) |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | // Fdump formats and displays the passed arguments to io.Writer w. It formats |
| 471 | // exactly the same as Dump. |