Skip to content

Instantly share code, notes, and snippets.

@chrisDeFouRire
Created February 23, 2018 23:29
Show Gist options
  • Save chrisDeFouRire/20dfb1b7ba6bf6b83689d26a6666f0ce to your computer and use it in GitHub Desktop.
Save chrisDeFouRire/20dfb1b7ba6bf6b83689d26a6666f0ce to your computer and use it in GitHub Desktop.
var (
// Tag is set by Gitlab's CI build process
Tag string
// Build is set by Gitlab's CI build process
Build string
)
router.HandleFunc("/ping", func(w http.ResponseWriter, req *http.Request) {
w.Header().Set("Content-type", "application/json")
w.WriteHeader(200)
json.NewEncoder(w).Encode(struct {
Tag string
Build string
}{Tag, Build})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment