diff --git a/cmd/shell.go b/cmd/shell.go index 5f3cdd780..9776d4411 100644 --- a/cmd/shell.go +++ b/cmd/shell.go @@ -25,6 +25,7 @@ import ( "encoding/json" "encoding/pem" "errors" + _ "expvar" // For DebugServer, below. "fmt" "io/ioutil" "log" diff --git a/core/util.go b/core/util.go index fa2b1733e..107cd9535 100644 --- a/core/util.go +++ b/core/util.go @@ -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