MCPcopy Index your code
hub / github.com/git-bug/git-bug / Validate

Method Validate

entity/dag/example_test.go:124–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

122}
123
124func (aa *AddAdministrator) Validate() error {
125 // Let's enforce an arbitrary rule
126 if len(aa.ToAdd) == 0 {
127 return fmt.Errorf("nothing to add")
128 }
129 return aa.OpBase.Validate(aa, AddAdministratorOp)
130}
131
132// Apply is the function that makes changes on the snapshot
133func (aa *AddAdministrator) Apply(snapshot *Snapshot) {

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
ValidateMethod · 0.65

Tested by

no test coverage detected