MCPcopy Create free account
hub / github.com/davecheney/pub / WithType

Function WithType

models/models_test.go:17–21  ·  view source on GitHub ↗

WithType sets the type of an actor.

(t ActorType)

Source from the content-addressed store, hash-verified

15// WithType sets the type of an actor.
16func WithType(t ActorType) func(*Actor) {
17 return func(a *Actor) {
18 a.Type = t
19 }
20}
21
22// MockActor creates a new actor in the database.
23func MockActor(t *testing.T, tx *gorm.DB, name, domain string, opts ...func(*Actor)) *Actor {
24 t.Helper()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected