Skip to content

Commit

Permalink
remove VERSION env var in system, may lead to side effects
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmittag committed Apr 13, 2022
1 parent 2a40f82 commit 67f4b3f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ func getHost() string {
}

func getVersion() string {
osv := os.Getenv("VERSION")
if len(osv) > 0 {
Version = osv
}

log.Debug().Str("version", Version).Msg("version determined")
return Version
}
Expand Down
2 changes: 1 addition & 1 deletion logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

func TestServerID(t *testing.T) {
os.Setenv("HOSTNAME", "localhost")
os.Setenv("VERSION", "v0.0.0")
Version = "v0.0.0"
initServerID()
want := "f47f7b28"
if ID != want {
Expand Down

0 comments on commit 67f4b3f

Please sign in to comment.