tweaks
This commit is contained in:
parent
5f095748f8
commit
99a46df581
@ -2,6 +2,8 @@ package example
|
||||
|
||||
import "context"
|
||||
|
||||
//go:generate moq PersonStore -out mockpersonstore_test.go
|
||||
|
||||
type Person struct {
|
||||
ID string
|
||||
Name string
|
||||
|
@ -78,9 +78,7 @@ func (m *Mocker) Mock(w io.Writer, name ...string) error {
|
||||
method.Returns = extractArgs(sig.Results(), "out%d")
|
||||
}
|
||||
objs = append(objs, obj)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
err := m.tmpl.Execute(w, struct{ Objs []*obj }{Objs: objs})
|
||||
if err != nil {
|
||||
|
@ -1,16 +1,14 @@
|
||||
package moq_test
|
||||
package moq
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
"testing"
|
||||
|
||||
"github.com/matryer/moq/package/moq"
|
||||
)
|
||||
|
||||
func TestMoq(t *testing.T) {
|
||||
|
||||
m, err := moq.New("../../example")
|
||||
m, err := New("../../example")
|
||||
if err != nil {
|
||||
t.Errorf("moq.New: %s", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user