MCPcopy Create free account
hub / github.com/compozy/agh / Normalize

Method Normalize

internal/memory/contract/types.go:30–40  ·  view source on GitHub ↗

Normalize trims and normalizes the parsed memory header metadata in place.

()

Source from the content-addressed store, hash-verified

28
29// Normalize trims and normalizes the parsed memory header metadata in place.
30func (h *Header) Normalize() {
31 h.Name = strings.TrimSpace(h.Name)
32 h.Description = strings.TrimSpace(h.Description)
33 h.Type = h.Type.Normalize()
34 h.Scope = h.Scope.Normalize()
35 h.AgentName = strings.TrimSpace(h.AgentName)
36 h.AgentTier = h.AgentTier.Normalize()
37 if h.Provenance != nil {
38 h.Provenance.Normalize()
39 }
40}
41
42// Validate reports whether the parsed memory header is complete and valid.
43func (h *Header) Validate() error {

Callers 2

ValidateMethod · 0.95
NormalizeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected