Skip to content

Doesn't support GOPATH list #123

@hectorj

Description

@hectorj

Hi! I'm giving a test ride to Kallax and I hit my first minor bump in the road. It's not critical as there is an easy workaround (export GOPATH=/my/first/go/path), but it is an inconvenience.

As described in the Go documentation, GOPATH can be a list (:-seperated on UNIX).

But currently the GOPATH is treated as a single value (here and here).

In my env it generates errors like this :

> echo $GOPATH
/my/first/go/path:/my/second/go/path
> go generate .
panic: open /my/first/go/path:/my/second/go/path/src/gopkg.in/src-d/go-kallax.v1/generator/templates/base.tgo: no such file or directory

goroutine 1 [running]:
gopkg.in/src-d/go-kallax.v1/generator.loadTemplateText(0x727b86, 0x12, 0x73a801, 0xc420049ed0)
        /my/first/go/path/src/gopkg.in/src-d/go-kallax.v1/generator/template.go:436 +0xe0
gopkg.in/src-d/go-kallax.v1/generator.makeTemplate(0x711a4e, 0x4, 0x727b86, 0x12, 0x1)
        /my/first/go/path/src/gopkg.in/src-d/go-kallax.v1/generator/template.go:448 +0x39
gopkg.in/src-d/go-kallax.v1/generator.init()
        /my/first/go/path/src/gopkg.in/src-d/go-kallax.v1/generator/template.go:457 +0x126
main.init()
        /my/first/go/path/src/gopkg.in/src-d/go-kallax.v1/generator/cli/kallax/cmd.go:80 +0x58
kallax.go:14: running "kallax": exit status 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions