Skip to content

Does not build to do moved dependencies #11

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

Closed
quirxmode opened this issue Feb 20, 2021 · 7 comments
Closed

Does not build to do moved dependencies #11

quirxmode opened this issue Feb 20, 2021 · 7 comments

Comments

@quirxmode
Copy link

Hi,
It seems it is currently impossible to go get this package. Somewhere down the line, it requires http://github.com/hashicorp/hcl/hcl/printer which no longer exists.
Kind regards,

q

@itzg
Copy link
Owner

itzg commented Feb 20, 2021

I am not having a problem running go get in this project. What version of Go are you using? Did you make sure to build with Go modules outside of $GOPATH?

@itzg
Copy link
Owner

itzg commented Feb 20, 2021

I double checked by doing a clone and build within a new container:

> docker run -it --rm golang:1.15
root@b3c87ff79419:/go# git clone https://github.com/itzg/rcon-cli.git
Cloning into 'rcon-cli'...
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 197 (delta 10), reused 26 (delta 6), pack-reused 166
Receiving objects: 100% (197/197), 36.04 KiB | 900.00 KiB/s, done.
Resolving deltas: 100% (87/87), done.
root@b3c87ff79419:/go# cd rcon-cli
root@b3c87ff79419:/go/rcon-cli# go install
go: downloading github.com/spf13/viper v1.3.1
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/james4k/rcon v0.0.0-20120923215419-8fbb8268b60a
go: downloading github.com/mitchellh/mapstructure v1.1.2
go: downloading github.com/spf13/pflag v1.0.3
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/spf13/jwalterweatherman v1.0.0
go: downloading github.com/pelletier/go-toml v1.2.0
go: downloading github.com/spf13/afero v1.1.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/spf13/cast v1.3.0
go: downloading github.com/magiconair/properties v1.8.0
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a
go: downloading golang.org/x/text v0.3.0
root@b3c87ff79419:/go/rcon-cli# rcon-cli -h

rcon-cli is a CLI for attaching to an RCON enabled game server, such as Minecraft.
Without any additional arguments, the CLI will start an interactive session with
the RCON server.

If arguments are passed into the CLI, then the arguments are sent
as a single command (joined by spaces), the response is displayed,
and the CLI will exit.

Usage:
  rcon-cli [flags] [RCON command ...]

Examples:

rcon-cli --host mc1 --port 25575
rcon-cli --port 25575 stop
RCON_PORT=25575 rcon-cli stop


Flags:
      --config string     config file (default is $HOME/.rcon-cli.yaml)
  -h, --help              help for rcon-cli
      --host string       RCON server's hostname (default "localhost")
      --password string   RCON server's password
      --port int          Server's RCON port (default 27015)

@quirxmode
Copy link
Author

Hm it works when you do it this way, i.e. first git clone, then go install. However, it fails for me if you directly say go get github.com/itzg/rcon-cli... Image is alpine with go version go1.13.15 linux/amd64.

@quirxmode
Copy link
Author

Same with the golang:1.15 image.

@itzg
Copy link
Owner

itzg commented Feb 20, 2021

Strange, that does it for me too and I have no idea why since go.sum doesn't reference it.

I provide prebuilt binaries and a docker image, if that helps.

@itzg
Copy link
Owner

itzg commented Feb 20, 2021

Explicitly enabling Go module mode builds properly (thanks to golang/go#38196 (comment))

GO111MODULE=on go get github.com/itzg/rcon-cli
go: downloading github.com/itzg/rcon-cli v0.0.0-20200516174253-31d6d63079b8
go: github.com/itzg/rcon-cli upgrade => v0.0.0-20200516174253-31d6d63079b8
go: downloading github.com/spf13/viper v1.3.1
go: downloading github.com/spf13/cobra v0.0.3
go: downloading github.com/james4k/rcon v0.0.0-20120923215419-8fbb8268b60a
go: downloading github.com/spf13/pflag v1.0.3
go: downloading github.com/magiconair/properties v1.8.0
go: downloading github.com/spf13/cast v1.3.0
go: downloading github.com/mitchellh/mapstructure v1.1.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/spf13/jwalterweatherman v1.0.0
go: downloading gopkg.in/yaml.v2 v2.2.2
go: downloading github.com/pelletier/go-toml v1.2.0
go: downloading github.com/spf13/afero v1.1.2
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a
go: downloading golang.org/x/text v0.3.0.

@quirxmode
Copy link
Author

Neat, I did not know about this. Guess we can close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants