Closed ajfriend closed 1 month ago
You will need to create a go.mod file alongside your h3example.go
file. This can be achieved by running go mod init
followed by go mod tidy
. After running both of these you should end up with a tree structure like below:
├── go.mod
├── go.sum
└── h3example.go
With this in place you should then be able to run your example with go run h3example.go
That worked. Thanks!
And if it is helpful for anyone else, here's a little example repo: https://github.com/ajfriend/h3llo_gorld
Glad it's working for you. Perchance, can this issue be closed now?
I've never used
go
before, and I'm trying to get a simple "Hello world" example running.I've run
brew install go
and I can run a simple example like this one (https://gobyexample.com/values) withgo run values.go
.I'd like to get a similar example running with h3, but I'm getting stuck on package management.
Following the readme example, I have a file
h3example.go
:I try running
go get github.com/uber/h3-go/v4
, but that redirects me to usego install
instead, so I tryBut I can't tell if that did anything...
So then I try:
I'm sure its simple, but any help would be appreciated!