podhmo / handwriting

handwriting go code
MIT License
0 stars 0 forks source link

more comfortable api #2

Open podhmo opened 6 years ago

podhmo commented 6 years ago
  1. import package by passing full address, two times, is tiresome.

e.g.

    f.Import("github.com/stretchr/testify/mock")
    f.Code(func(e *handwriting.Emitter) error {
        mockpkg := e.Prog.Package("github.com/stretchr/testify/mock").Pkg
        // do something...
    }
podhmo commented 6 years ago
  1. What is Emitter? (this is not good for Code function's arguments)
    f.Code(func(e *handwriting.Emitter) error {
        // do something?
    }