Skip to content

pedrofurtado/golang-studies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Golang studies

My golang studies

Tips for performance in Go

  • Use named variable returns in functions
  • Use fixed array size always possible
  • Concatenate string with Join
  • Define structs with longer fields first (string, int), short fields later (bool), and sub-structs at final
docker container run -w /app -v $(pwd):/app --rm -it golang:1.22.2 go run main.go
docker container run -w /app -v $(pwd):/app --rm -it golang:1.22.2 go run channels.go
docker container run -w /app -v $(pwd):/app --rm -it golang:1.22.2 bash -c "cd modulo/ && go run main.go"

About

My golang studies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages