Export BuildID via expvars.
This commit is contained in:
parent
921f161430
commit
169a0b79e3
|
|
@ -25,6 +25,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"errors"
|
"errors"
|
||||||
|
_ "expvar" // For DebugServer, below.
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
"errors"
|
"errors"
|
||||||
|
"expvar"
|
||||||
"fmt"
|
"fmt"
|
||||||
"hash"
|
"hash"
|
||||||
"io"
|
"io"
|
||||||
|
|
@ -48,6 +49,11 @@ var BuildHost string
|
||||||
// BuildTime is set by the compiler and is used by GetBuildTime
|
// BuildTime is set by the compiler and is used by GetBuildTime
|
||||||
var BuildTime string
|
var BuildTime string
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
expvar.NewString("BuildID").Set(BuildID)
|
||||||
|
expvar.NewString("BuildTime").Set(BuildTime)
|
||||||
|
}
|
||||||
|
|
||||||
// Errors
|
// Errors
|
||||||
|
|
||||||
// InternalServerError indicates that something has gone wrong unrelated to the
|
// InternalServerError indicates that something has gone wrong unrelated to the
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue