func (fp *Failpoint) flush(dst io.Writer) error {
	if len(fp.code) == 0 {
		return fp.flushSingle(dst)
	}
	return fp.flushMulti(dst)
}
flush writes the failpoint code to a buffer
package code
import (
	"fmt"
	"io"
	"strings"
)
type Failpoint struct {
	goFailGo bool
	name    string
	varType string
	code    []string
	ws string
}
func newFailpoint(l string) (*Failpoint, error) {
	lt := strings.TrimSpace(l)
	isGoFail, isGoFailGo := strings.HasPrefix(lt, pfxGofail), strings.HasPrefix(lt, pfxGofailGo)
	if !isGoFail && !isGoFailGo {
		return nil, nil
	}
	pfx := pfxGofail
	if isGoFailGo {
		pfx = pfxGofailGo
	}
	cmd := strings.SplitAfter(l, pfx)[1]
	fields := strings.Fields(cmd)
	if len(fields) != 3 || fields[0] != "var" {
		return nil, fmt.Errorf("failpoint: malformed comment header %q", l)
	}
	return &Failpoint{goFailGo: isGoFailGo, name: fields[1], varType: fields[2], ws: strings.Split(l, "//")[0]}, nil
}