-
Notifications
You must be signed in to change notification settings - Fork 0
GoLang
Henry m edited this page Oct 4, 2023
·
13 revisions
- mkdir my_server
- cd my_server
- go mod init my_server
- vi my_server.go
- go mod tidy
- go run .
- single line comment:
//
- block comment:
/* */
To use it:
- Add
"github.com/gorilla/websocket"
to the codesimport()
section - run: go mod init example.com/m/v2
- go mod tidy
and now you can build.
- go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- add
option go_package = "./mypkgname";
to the .proto file - protoc -I=. --go_out=. ./my.api.proto
- go mod tidy