Skip to content

Instantly share code, notes, and snippets.

@gsquire
Created April 15, 2016 21:11
Show Gist options
  • Save gsquire/cce277b4bd10ba283f4522e896dc91d6 to your computer and use it in GitHub Desktop.
Save gsquire/cce277b4bd10ba283f4522e896dc91d6 to your computer and use it in GitHub Desktop.
// Package test.
//
// The purpose is to demonstrate swagger docs for a test app.
//
// Schemes: http
// Host: localhost
// Produces:
// - application/text
//
// swagger:meta
package main
import (
"fmt"
"net/http"
)
func Index(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "Welcome\n")
}
func main() {
http.HandleFunc("/", Index)
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment