Closed davidheitman closed 4 years ago
I'm trying to include kapacitor-unit as part of a development environment build and running into the same issue.
go get github.com/gpestana/kapacitor-unit package github.com/gpestana/kapacitor-unit: no Go files in /home/vagrant/go/src/github.com/gpestana/kapacitor-unit
Any advice or workarounds?
I will take a look at it. I think a bad PR was merged at some point
As a temporary workaround, you can suffix the go get and go install commands with "/cmd/kapacitor-unit", which is where the main function was moved.
Thanks for the workaround! Much appreciated.
I added go mod
and updated the documentation. Everything should work properly now, please re-open the issue if it does not.
fix: https://github.com/gpestana/kapacitor-unit/commit/80689aeca1df16545e8000b1f0cf9c7b4ff88e5d
Installation appears to be broken now:
xxx@xxx:~/repos/go$ go get github.com/gpestana/kapacitor-unit package github.com/gpestana/kapacitor-unit: no Go files in /home/xxx/repos/go/src/github.com/gpestana/kapacitor-unit
(but the files are downloaded) Then:
xxx@xxx:~/repos/go$ go install github.com/gpestana/kapacitor-unit can't load package: package github.com/gpestana/kapacitor-unit: no Go files in /home/xxx/repos/go/src/github.com/gpestana/kapacitor-unit
I'm new to go, but I believe the problem is this commit:
fe70122344b8086f8b94f1bfecdc52aab8ff0d91
I think it's because there's no longer a top-level file with a main() function, so go get/install throw errors.