go mod init github.com/jrfernandodasilva/golang-roadmap
go mod tidy -v
go run main.go
go build -o golang-roadmap main.go
GOOS=linux GOARCH=amd64 go build -o golang-roadmap main.go
GOOS=windows GOARCH=amd64 go build -o golang-roadmap.exe main.go
GOOS=darwin GOARCH=amd64 go build -o golang-roadmap main.go
GOOS=android GOARCH=arm64 go build -o golang-roadmap main.go
go fmt main.go
go test -v
go test -v ./functions
go test -v ./math/int_operations_test.go
go test -v ./math/int_operations_test.go -run TestAddInt
cd benchmark
go test -v -bench=. -benchmem
See project structure suggestion in Wiki
Action | Description | Command |
---|---|---|
build | Builds the container image from the Dockerfile | docker build -t golang-roadmap:unstable . |
run | To runs the container image | docker run -d --rm --name golang-roadmap-app golang-roadmap:unstable |
sh | To open a shell in the container | docker exec -it golang-roadmap-app sh |
logs | To view the logs of the container | docker logs golang-roadmap-app |
stop | To stop the container | docker stop golang-roadmap-app |
rm | To remove the container | docker rm golang-roadmap-app |