Skip to content
/ outyet Public

A web server that answers the question: "Is Go 1.x out yet?"

License

Notifications You must be signed in to change notification settings

l0rd/outyet

Repository files navigation

Go example project

This repository contains a Go program that demonstrates the language, standard libraries, and tools.

The example has been copied from golang/example

A web server that answers the question: "Is Go 1.x out yet?"

Topics covered:

  • Command-line flags (flag)
  • Web servers (net/http)
  • HTML Templates (html/template)
  • Logging (log)
  • Long-running background processes
  • Synchronizing data access between goroutines (sync)
  • Exporting server state for monitoring (expvar)
  • Unit and integration tests (testing)
  • Dependency injection
  • Time (time)

Build the container image

podman build -t ghcr.io/l0rd/outyet:latest --arch amd64 \
      --label "org.opencontainers.image.source=https://github.com/l0rd/outyet" \
      --label "org.opencontainers.image.description=A very simple go app" \
      --label "org.opencontainers.image.licenses=Apache-2.0" \
      --label "org.opencontainers.image.description=A sample Go web app" .
podman push ghcr.io/l0rd/outyet:latest

Run the application on Kubernetes

kubectl apply -f config/
kubectl expose deployment outyet --type=NodePort --port=8080

Delete the application

ko delete -f config/

Build the container to debug the application

podman build -t ghcr.io/l0rd/outyet-dev:latest --arch amd64 \
      --label "org.opencontainers.image.source=https://github.com/l0rd/outyet" \
      --label "org.opencontainers.image.description=A very simple go app" \
      --label "org.opencontainers.image.licenses=Apache-2.0" -f Dockerfile.dev .
podman push ghcr.io/l0rd/outyet-dev:latest

About

A web server that answers the question: "Is Go 1.x out yet?"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •