From 1880051753cbb5fd7327c255f5e6e2a0bc049617 Mon Sep 17 00:00:00 2001 From: Mark McGranaghan Date: Thu, 20 Sep 2012 10:16:01 -0700 Subject: [PATCH] updates --- README | 4 ++++ src/xx-http-server-graceful-shutdown.go | 4 ++-- src/xx-http-server-log.go | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README b/README index c0905a2..ad97aee 100644 --- a/README +++ b/README @@ -97,6 +97,10 @@ devcenter * benchmarking * profiling * command line program +* using go with textmate +* using go with sublime +* using go with vi +* using go with emacs * setting up go env, hello world * deploying to heroku diff --git a/src/xx-http-server-graceful-shutdown.go b/src/xx-http-server-graceful-shutdown.go index 722808b..17205e9 100644 --- a/src/xx-http-server-graceful-shutdown.go +++ b/src/xx-http-server-graceful-shutdown.go @@ -46,7 +46,7 @@ func main() { fmt.Println("listen at=finish") go func() { - <-stop + <- stop fmt.Println("close at=start") closeErr := wListener.Close() if closeErr != nil { panic(closeErr) } @@ -78,7 +78,7 @@ func main() { // == todo // clean up logging -// consider refactoring +// factor out to cut-and-pastable against normal app // == running // $ cd src diff --git a/src/xx-http-server-log.go b/src/xx-http-server-log.go index e4e7033..3c69eda 100644 --- a/src/xx-http-server-log.go +++ b/src/xx-http-server-log.go @@ -8,7 +8,7 @@ func runLogging(logs chan string) { } } -func wrapLogging(f http.HandlerFunc, logs chan string) http.HandlerFunc { +func wrapLogging(f http.HandlerFunc) http.HandlerFunc { logs := make(chan string, 10000) go runLogging(logs) return func(res http.ResponseWriter, req *http.Request) {