github.com/moitias/moq@v0.0.0-20240223074357-5eb0f0ba4054/example/example.go (about) 1 package example 2 3 import "context" 4 5 //go:generate moq -out mockpersonstore_test.go . PersonStore 6 7 // Person represents a real person. 8 type Person struct { 9 ID string 10 Name string 11 Company string 12 Website string 13 } 14 15 // PersonStore provides access to Person objects. 16 type PersonStore interface { 17 Get(ctx context.Context, id string) (*Person, error) 18 Create(ctx context.Context, person *Person, confirm bool) error 19 }