0

Using the go bundle too located here:

https://godoc.org/golang.org/x/tools/cmd/bundle

I try running:

bundle -o bun ./builds/one

and I get this error:

bundle: cannot find package in current directory: no buildable Go source files in $PWD

Why is the tool not understanding that I want to search for go files in

$PWD/builds/one

not

$PWD

?

I tried using an absolute path instead of relative path, same problem. The directory looks like:

$PWD/
  builds/
      one/
        bar/
          bar.go
        foo/
          foo.go
        one.go

maybe I need to set $GOPATH or $GOROOT? I tried setting those, same problem.

  • From the docs you link to "The src argument specifies the import path of the package to bundle" so it is looking for an import path like you would use in a go import, not a path to the package. – Iain Duncan Nov 29 '18 at 05:35
  • @IainDuncan sorry I am trying but I don't follow what you mean, maybe add an answer? –  Nov 29 '18 at 05:43
  • You wouldn't write `import ./builds/one` in your go file, instead it would be (depending on your go path) `import builds/one` so that is the argument you should use – Iain Duncan Nov 29 '18 at 06:32
  • Please reconsider what you are trying to do. Also note that SO is the wrong place for this type of questions. Asking on golang-nuts might be much better. – Volker Nov 29 '18 at 07:55

0 Answers0