Install the easyjson tool and package based on your Go version.
For Go < 1.17:
go get -u github.com/mailru/easyjson/...
For Go >= 1.17:
go get github.com/mailru/easyjson && go install github.com/mailru/easyjson/...@latest
Note: easyjson requires a full Go build environment and the GOPATH environment variable to be set because the code generation process invokes go run on temporary files.
# for Go < 1.17
go get -u github.com/mailru/easyjson/...
# for Go >= 1.17
go get github.com/mailru/easyjson && go install github.com/mailru/easyjson/...@latest