package xio import "os" // OpenTwo opens two files, and the caller needs to check for a single error only. func OpenTwo(f1, f2 string) (g1 *os.File, g2 *os.File, err error) { if g1, err = os.Open(f1); err != nil { return nil, nil, err } if g2, err = os.Open(f2); err != nil { return nil, nil, err } return g1, g2, nil }