-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
We should return an error here:
Lines 195 to 211 in e7db242
| // FormatManifest returns the file version manifest in json or csv format | |
| func FormatManifest(fileVersions map[string]string, format string) ([]byte, error) { | |
| if format == "json" { | |
| return json.MarshalIndent(fileVersions, "", " ") | |
| } | |
| if format == "csv" { | |
| b := &bytes.Buffer{} | |
| wr := csv.NewWriter(b) | |
| for filename, uri := range fileVersions { | |
| row := []string{filename, uri} | |
| wr.Write(row) | |
| } | |
| wr.Flush() | |
| return b.Bytes(), nil | |
| } | |
| return nil, nil | |
| } |