Compiling ziti from SDK

I am still working out how to program in Golang. I find it really interesting and a language that I definitely want to develop more apps in.

One thing that I am stuck on is how to compile the ziti binary.

I have done the following steps

  1. go mod init
  2. I copied the contents of the go mod file from the parent directory.

When I enter go build… nothing happens

When I enter go build ziti.go… I get the following


./ziti.go:154:21: undefined: Options
./ziti.go:205:54: undefined: Options
./ziti.go:207:13: undefined: DefaultOptions
./ziti.go:245:37: undefined: ServiceRemoved
./ziti.go:261:37: undefined: ServiceAdded
./ziti.go:265:38: undefined: ServiceChanged

I really don’t know what I am doing…

any tips?

You probably need go 1.18 now. You should just be able to run

go build ./... -o outputfolder

There’s tons of really good resources online for learning go. Usually for me it comes down to my go version when the above command doesn’t just work

1 Like