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

Method Validate

internal/task/validate.go:376–384  ·  view source on GitHub ↗

Validate reports whether the origin contains a supported kind and non-empty reference.

(path string)

Source from the content-addressed store, hash-verified

374
375// Validate reports whether the origin contains a supported kind and non-empty reference.
376func (o Origin) Validate(path string) error {
377 if err := o.Kind.Validate(nestedPath(path, "kind")); err != nil {
378 return err
379 }
380 if strings.TrimSpace(o.Ref) == "" {
381 return fmt.Errorf("%w: %s is required", ErrValidation, nestedPath(path, "ref"))
382 }
383 return nil
384}
385
386// Validate reports whether the authority flags are internally consistent.
387func (a Authority) Validate(path string) error {

Calls 2

nestedPathFunction · 0.70
ValidateMethod · 0.65

Tested by

no test coverage detected