Skip to content
This repository was archived by the owner on Aug 14, 2026. It is now read-only.
This repository was archived by the owner on Aug 14, 2026. It is now read-only.

Throw error for invalid manifest format #9

Description

@djfarrelly

We should return an error here:

// 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
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions