Initialize the Project
1. Prepare the system
- Ensure your Go is at least
1.24.1
; you can check in the terminal by running:
go version
2. Initialize the Go project and add doors
- Initialize a new project.
mkdir project
cd project
go mod init github.com/derstruct/project # address of your repo (actually can be anything)
You can find the code from this tutorial here https://github.com/derstruct/doors-tutorial. Branch name ~= part name.
- Get the doors dependency
go get github.com/doors-dev/doors
3. Hello World
Create ./main.go
package main
func main() {
println("hello world")
}
Run:
$ go run .
hello world
Next: Home Page