From 3b2ab247aa6cd50b7c3fe966065901fc928ac980 Mon Sep 17 00:00:00 2001 From: Carl Jackson Date: Tue, 6 Jan 2015 16:03:21 +0100 Subject: [PATCH] Get rid of many appengine build tags This is now controlled at the top level goji package: these packages are not even compiled in when using App Engine. This is sensible, since neither package is of any use there. --- bind/einhorn.go | 2 +- bind/einhorn_stub.go | 2 +- bind/systemd.go | 2 +- bind/systemd_stub.go | 2 +- graceful/einhorn.go | 2 +- serve_appengine.go | 11 ++++++++++- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/bind/einhorn.go b/bind/einhorn.go index d18b694..e695c0e 100644 --- a/bind/einhorn.go +++ b/bind/einhorn.go @@ -1,4 +1,4 @@ -// +build !windows,!appengine +// +build !windows package bind diff --git a/bind/einhorn_stub.go b/bind/einhorn_stub.go index 18cd3b3..093707f 100644 --- a/bind/einhorn_stub.go +++ b/bind/einhorn_stub.go @@ -1,4 +1,4 @@ -// +build windows appengine +// +build windows package bind diff --git a/bind/systemd.go b/bind/systemd.go index 292f509..e7cd8e4 100644 --- a/bind/systemd.go +++ b/bind/systemd.go @@ -1,4 +1,4 @@ -// +build !windows,!appengine +// +build !windows package bind diff --git a/bind/systemd_stub.go b/bind/systemd_stub.go index 1ac1bad..4ad4d20 100644 --- a/bind/systemd_stub.go +++ b/bind/systemd_stub.go @@ -1,4 +1,4 @@ -// +build windows appengine +// +build windows package bind diff --git a/graceful/einhorn.go b/graceful/einhorn.go index ad78d1c..082d1c4 100644 --- a/graceful/einhorn.go +++ b/graceful/einhorn.go @@ -1,4 +1,4 @@ -// +build !windows,!appengine +// +build !windows package graceful diff --git a/serve_appengine.go b/serve_appengine.go index 2d39665..88dc7a8 100644 --- a/serve_appengine.go +++ b/serve_appengine.go @@ -2,7 +2,16 @@ package goji -import "net/http" +import ( + "log" + "net/http" +) + +func init() { + if fl := log.Flags(); fl&log.Ltime != 0 { + log.SetFlags(fl | log.Lmicroseconds) + } +} // Serve starts Goji using reasonable defaults. func Serve() {