1. Installiere Go (mit brew install go)

  2. Navigiere an den zukünftigen Projektort:

    1. cd documents/projects/go
    2. mkdir goLearnProjectFolder
    3. cd goLearnProjectFolder
  3. Erstelle ein neues modul: go mod init <Name>

  4. Öffne VS Code: code . (how to install code .)

  5. erstelle ein file in VS Code <name>.go

  6. Füge ein Basic-Code ein:

    package main
    
    import "fmt"
    
    func main() {
        fmt.Println("Hello, World!")
    }
    
  7. führe es mit go run . aus oder mit go run <name>.go

Live reloading

Using Air with Go to implement live reload - LogRocket Blog

https://github.com/cosmtrek/air


Clone Git Repo

  1. Clone the git-repository with git clone <https://github.com/m-mattia-m/go-project>
  2. go into the folder with cd go-project
  3. install the packages with go install
  4. run the package with go run main.go oder go run .
    1. possibly you need to set the .env-File