package catalogue import ( "strings" ) // A module may name the directory its templates are kept in (`"templates": ""`, default files/; issue 731): a // module whose files/ is already an archive unpacked onto the machine keeps its templates in a directory of their // own, packed into an archive no resource names, so its unpacked files/ is exactly what it was. func builtUnpacking(templates map[string]string) []Built { built := []Built{{Name: "scripts", Kind: ArtifactArchive, Reference: "https://store.invalid/scripts.tar.gz", Digest: "sha256:" + strings.Repeat("a", 64)}} if templates != nil { built = append(built, Built{Name: "templates", Kind: ArtifactArchive, Reference: ArtifactStoreScheme + "tidy/templates/blobs/sha256:" + strings.Repeat("b", 64), Digest: "sha256:" + strings.Repeat("b", 64), Texts: templates}) } return built }