New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
easyjson is not so vendor friendly #29
Comments
I see a partial fix was applied in #65 but you'll also need to do the same on the path returned by I'm happy to prepare a PR if the above sounds like the right fix. package main
import (
"fmt"
"os"
"github.com/mailru/easyjson/gen"
pkg "github.com/foo/bar/vendor/github.com/foo/baz"
)
func main() {
g := gen.NewGenerator("banks.pb_easyjson.go")
g.SetPkg("protocol", "github.com/foo/bar/vendor/github.com/foo/baz")
g.Add(pkg.EasyJSON_exporter_Thing(nil))
if err := g.Run(os.Stdout); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
} |
luma
added a commit
to autopilothq/easyjson
that referenced
this issue
Feb 13, 2017
If the package that easyjson is being used on is vendor'd then we need to strip off the vendor'd bit of the pkg path Fixes: mailru#29 See: golang/go#12739
rubensayshi
pushed a commit
to btccom/easyjson
that referenced
this issue
Dec 29, 2017
If the package that easyjson is being used on is vendor'd then we need to strip off the vendor'd bit of the pkg path Fixes: mailru#29 See: golang/go#12739
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Consider the following code:
Given that
github.com/repo1/package2
is already vendored, e.g. there is avendor/github.com/repo1/package2
directory along with the go source code above. Running theeasyjson
binary will create an import line that looks somelike:Instead, it should just be:
My
go env
just FYI:The text was updated successfully, but these errors were encountered: