MCPcopy Create free account
hub / github.com/git-bug/git-bug / Validate

Method Validate

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

Source from the content-addressed store, hash-verified

159}
160
161func (ra *RemoveAdministrator) Validate() error {
162 // Let's enforce some rules. If we return an error, this operation will be
163 // considered invalid and will not be included in our data.
164 if len(ra.ToRemove) == 0 {
165 return fmt.Errorf("nothing to remove")
166 }
167 return ra.OpBase.Validate(ra, RemoveAdministratorOp)
168}
169
170// Apply is the function that makes changes on the snapshot
171func (ra *RemoveAdministrator) Apply(snapshot *Snapshot) {

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.80
ValidateMethod · 0.65

Tested by

no test coverage detected