Skip to content

Commit 2e46675

Browse files
print version on startup
1 parent 0fdd983 commit 2e46675

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

exec/http/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ import (
1919
var config Config
2020
var nonceMap = ttlcache.NewCache()
2121

22+
var version string
23+
var buildDate string
24+
2225
func init() {
26+
log.Printf("network-measure HTTP %s, built at %s\n", version, buildDate)
2327
config.SetDefault()
2428
if c, err := ioutil.ReadFile("./config.toml"); err == nil {
2529
if err = toml.Unmarshal(c, &config); err != nil {

exec/ws/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ import (
2222

2323
var config Config
2424

25+
var version string
26+
var buildDate string
27+
2528
const (
2629
cmdResolve = iota
2730
cmdPing
@@ -166,6 +169,8 @@ func handleSpeed(body []byte) (r []byte) {
166169
}
167170

168171
func init() {
172+
log.Printf("network-measure HTTP %s, built at %s\n", version, buildDate)
173+
169174
config.SetDefault()
170175
if c, err := ioutil.ReadFile("./config.toml"); err == nil {
171176
if err = toml.Unmarshal(c, &config); err != nil {

0 commit comments

Comments
 (0)