Skip to content

Instantly share code, notes, and snippets.

@skaffen2
Forked from maxmcd/main.go
Last active November 9, 2015 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save skaffen2/edb43bd03e1f9517cac6 to your computer and use it in GitHub Desktop.
Save skaffen2/edb43bd03e1f9517cac6 to your computer and use it in GitHub Desktop.
Gitbaotest
package main
import (
"fmt"
"net/http"
"time"
"baodata"
)
func main() {
resp := baodata.Put("/users", baodata.Data{"email", "git@gitbao.com"})
http.HandleFunc("/",
func(w http.ResponseWriter, req *http.Request) {
w.Write([]byte(fmt.Sprintf("Gitbao is awesome at %s", time.Now())))
resp, _ := baodata.Get("/users")
w.Write([]byte(fmt.Sprintf("users: %s", resp)
})
http.ListenAndServe(":8080", nil)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment