// This is from github.com/spf13/pflag for string slice flags.
This is from github.com/spf13/pflag for string slice flags.
// This is from github . com / spf13 / pflag for string slice flags .
func writeAsCSV(vals []string) ([]byte, error) {
	b := &bytes.Buffer{}
	w := csv.NewWriter(b)
	err := w.Write(vals)
	if err != nil {
		return nil, err
	}
	w.Flush()
	return bytes.TrimSuffix(b.Bytes(), []byte("\n")), nil
}
func writeAsCSV ( vals [ ] string ) ( [ ] byte , error ) { b := & bytes . Buffer { } w := csv . NewWriter ( b ) err := w . Write ( vals ) if err != nil { return nil , err } w . Flush ( ) return bytes . TrimSuffix ( b . Bytes ( ) , [ ] byte ( " \n " ) ) , nil }
This is from github.com/spf13/pflag for string slice flags.
This is from github . com / spf13 / pflag for string slice flags .