Files
mesh-sdk/go/catalogue/templates_dir_test.go
T
jschoubben 1c7356c247
mesh/delivery-group group feat/sdk1 rejected: composed together: the checker's verdict at the members' heads (428d048dd50a): unit: git.novox.be/novox/mesh-sdk/…
mesh/delivery closed: a newer head of the same pull request
mesh/check failed: unit: git.novox.be/novox/mesh-sdk/go/process.TestStatePutWritesAKeyWhole: a Put through a short blackout: 0, mesh-mail's state send…
catalogue: the composition's rules and refusals leave for the node-engine, so mesh-sdk renders no declaration and refuses no composition (ADR 0593 §7)
Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
2026-11-02 19:19:25 +01:00

22 lines
871 B
Go

package catalogue
import (
"strings"
)
// A module may name the directory its templates are kept in (`"templates": "<dir>"`, 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
}