Export BuildID via expvars.

This commit is contained in:
Jacob Hoffman-Andrews 2015-11-23 21:48:06 -08:00
parent 921f161430
commit 169a0b79e3
2 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,7 @@ import (
"encoding/json"
"encoding/pem"
"errors"
_ "expvar" // For DebugServer, below.
"fmt"
"io/ioutil"
"log"

View File

@ -21,6 +21,7 @@ import (
"encoding/json"
"encoding/pem"
"errors"
"expvar"
"fmt"
"hash"
"io"
@ -48,6 +49,11 @@ var BuildHost string
// BuildTime is set by the compiler and is used by GetBuildTime
var BuildTime string
func init() {
expvar.NewString("BuildID").Set(BuildID)
expvar.NewString("BuildTime").Set(BuildTime)
}
// Errors
// InternalServerError indicates that something has gone wrong unrelated to the