Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: golden/go/skiacorrectness/main.go

Issue 659943006: Do not forget to call `defer glog.Flush()` in our applications (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: revert titletool changes Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | monitoring/go/grains/grains.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: golden/go/skiacorrectness/main.go
diff --git a/golden/go/skiacorrectness/main.go b/golden/go/skiacorrectness/main.go
index 3b23b3161c47f6e0b40804b5695b035521126f64..77d733894ac1c11b056b410c678eb2be49081eab 100644
--- a/golden/go/skiacorrectness/main.go
+++ b/golden/go/skiacorrectness/main.go
@@ -3,13 +3,11 @@ package main
import (
"flag"
"net/http"
-)
-import (
"github.com/golang/glog"
)
-// flags
+// Command line flags.
var (
port = flag.String("port", ":9000", "HTTP service address (e.g., ':9000')")
staticDir = flag.String("static", "./app", "Directory with static content to serve")
@@ -20,15 +18,11 @@ var (
)
func main() {
- // parse the arguments
flag.Parse()
+ defer glog.Flush()
- // // Static file handling
http.Handle("/", http.FileServer(http.Dir(*staticDir)))
- // Wire up the resources
-
- // Start the server
glog.Infoln("Serving on http://127.0.0.1" + *port)
glog.Fatal(http.ListenAndServe(*port, nil))
}
« no previous file with comments | « no previous file | monitoring/go/grains/grains.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698