R. S. Doiel, rsdoiel@caltech.edu
Caltech Library, Digital Library Development
2025-09-26
Welcome everyone,
This presentation is based on a blog post I wrote Getting started with Go
Go to the URL, the Go for your computer and operating system.
Follow the instructions to install it.
cd helloworld
go run helloworld.go
go build helloworld.go
Congratulations!
See https://pkg.go.dev/net/http#example-FileServer-DotFileHiding
go run webserver.go
go build webserver.go
curl -O https://caltechlibrary/presentations/mdserver/markdown.go
curl -O https://caltechlibrary/presentations/mdserver/handler.go
curl https://caltechlibrary/presentations/mdserver/cmd/mdserver/main.go \
>cmd/mdserver/main.go
go mod init 'github.com/caltechlibrary/mdserver'
go mod tidy
go get "github.com/yuin/goldmark"
We use “go get” because this is not a standard library package.
Save this as helloworld.md
go run cmd/mdserver/main.go
go build -o bin/mdserver cmd/mdserver/main.go