diff --git a/cmd/pkger/pack.go b/cmd/pkger/pack.go index 29ee307..7910133 100644 --- a/cmd/pkger/pack.go +++ b/cmd/pkger/pack.go @@ -9,7 +9,7 @@ import ( "github.com/markbates/pkger" "github.com/markbates/pkger/here" "github.com/markbates/pkger/parser" - "github.com/markbates/pkger/pkging/mem" + "github.com/markbates/pkger/pkging/stuffing" ) const outName = "pkged.go" @@ -140,7 +140,7 @@ func Package(out string, paths []here.Path) error { } fmt.Fprintf(f, "\nvar _ = pkger.Apply(mem.UnmarshalEmbed([]byte(`") - if err := mem.Stuff(f, c, paths); err != nil { + if err := stuffing.Stuff(f, c, paths); err != nil { return err } diff --git a/pkging/mem/embed_test.go b/pkging/mem/embed_test.go index 9f44d7b..977bcd3 100644 --- a/pkging/mem/embed_test.go +++ b/pkging/mem/embed_test.go @@ -1,4 +1,4 @@ -package mem +package mem_test import ( "bytes" @@ -8,6 +8,8 @@ import ( "github.com/markbates/pkger/here" "github.com/markbates/pkger/parser" + "github.com/markbates/pkger/pkging/mem" + "github.com/markbates/pkger/pkging/stuffing" "github.com/stretchr/testify/require" ) @@ -41,10 +43,10 @@ func Test_Pkger_Embedding(t *testing.T) { bb := &bytes.Buffer{} - err = Stuff(bb, info, paths) + err = stuffing.Stuff(bb, info, paths) r.NoError(err) - pkg, err := UnmarshalEmbed(bb.Bytes()) + pkg, err := mem.UnmarshalEmbed(bb.Bytes()) r.NoError(err) var res []string diff --git a/pkging/mem/stuffing.go b/pkging/stuffing/stuffing.go similarity index 88% rename from pkging/mem/stuffing.go rename to pkging/stuffing/stuffing.go index f9b73b4..9204a33 100644 --- a/pkging/mem/stuffing.go +++ b/pkging/stuffing/stuffing.go @@ -1,9 +1,10 @@ -package mem +package stuffing import ( "io" "github.com/markbates/pkger/here" + "github.com/markbates/pkger/pkging/mem" "github.com/markbates/pkger/pkging/stdos" ) @@ -13,7 +14,7 @@ func Stuff(w io.Writer, cur here.Info, paths []here.Path) error { return err } - pkg, err := New(cur) + pkg, err := mem.New(cur) if err != nil { return err }