Describe about CLI of Go
Command
go mod init <PATH>= Create module for management Go project. It will create go.mod file same as package.json in Node.
go mod init <PATH>
go build <FILE_NAME> = Build source code to be binary.
go build <FILE_NAME>
go get <PACKAGE_NAME>= Download package and store in module cache
go get <PACKAGE_NAME>
go mod tidy = It adds any missing module requirements necessary to build the current module’s packages and dependencies.
go mod tidy
Last updated 1 year ago