Export BuildID via expvars.
This commit is contained in:
parent
921f161430
commit
169a0b79e3
|
|
@ -25,6 +25,7 @@ import (
|
|||
"encoding/json"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
_ "expvar" // For DebugServer, below.
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue