Exemple #1
0
Fichier : run.go Projet : 0x7cc/rsc
func main() {
	log.SetFlags(0)
	ctxt := fs.NewContext(new(http.Request))
	if err := dashboard.Update(ctxt, nil, "Go 1.2"); err != nil {
		log.Fatal(err)
	}
	log.Print("OK")
}
Exemple #2
0
Fichier : app.go Projet : 0x7cc/rsc
func AdminDashboard(w http.ResponseWriter, req *http.Request) {
	version := "Go " + strings.TrimPrefix(req.URL.Path, "/admin/dashboard/")
	ctxt := fs.NewContext(req)
	ctxt.Mkdir("issue-dashboard")
	c := appengine.NewContext(req)
	if err := dashboard.Update(ctxt, urlfetch.Client(c), version); err != nil {
		fmt.Fprintf(w, "Error updating: %s\n", err)
	} else {
		fmt.Fprintf(w, "Updated.\n")
	}
}