func writeHeader(w io.Writer, p types.Path, wroteHdr *bool) error { if *wroteHdr { return nil } *wroteHdr = true hdr := "(root)" if len(p) > 0 { hdr = p.String() } return write(w, []byte(hdr+" {\n")) }
func writeHeader(w io.Writer, wroteHeader bool, p types.Path) bool { var err error if !wroteHeader { _, err = w.Write([]byte(p.String())) d.Exp.NoError(err) _, err = w.Write([]byte(" {\n")) d.Exp.NoError(err) wroteHeader = true } return wroteHeader }
func writeHeader(w io.Writer, wroteHeader bool, p types.Path) bool { if !wroteHeader { if len(p) == 0 { write(w, []byte("(root)")) } else { write(w, []byte(p.String())) } write(w, []byte(" {\n")) } return true }