Skip to content

πŸ“š Basic syntax repo for programming language GO.

License

Notifications You must be signed in to change notification settings

tjcchen/go-practice

Repository files navigation

go-practice

Basic syntax repo for programming language GO.

Resources

12 factors: https://12factor.net/

Most Commonly Used Commands

# compile and run Go program
go run hello.go

# module maintenance
go mod xxx   # eg: go mod tidy

# compile a Go file to binary
go build hello.go   # with output directory: go build -o bin/mybinary

# execute the binary
./hello

# format a Go file
go fmt hello.go

# add dependencies to current module and install them
go get dependencies

# compile and install packages and dependencies
go install xxx

# test packages
go test xxx

# run specific go tool
go tool xxx

# report likely mistakes in packages, static code checking
go vet hello.go

# misc - environment variables
GOOS=linux GOARCH=amd64 go build

# misc - full list
$GOROOT/src/go/build/syslist.go

License

This project is licensed under the terms of the MIT license.

About

πŸ“š Basic syntax repo for programming language GO.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages