Skip to content

Commit

Permalink
Replace hardcoded version with ldflag usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jhalter committed Jun 15, 2024
1 parent 95159e5 commit f6f1d88
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 6 additions & 0 deletions cmd/mobius-hotline-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ func main() {
}(srv)
}

slogger.Info("Hotline server started",
"version", version,
"API port", fmt.Sprintf("%s:%v", *netInterface, *basePort),
"Transfer port", fmt.Sprintf("%s:%v", *netInterface, *basePort+1),
)

// Serve Hotline requests until program exit
log.Fatal(srv.ListenAndServe(ctx, cancel))
}
Expand Down
6 changes: 0 additions & 6 deletions hotline/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ type PrivateChat struct {
}

func (s *Server) ListenAndServe(ctx context.Context, cancelRoot context.CancelFunc) error {
s.Logger.Info("Hotline server started",
"version", VERSION,
"API port", fmt.Sprintf("%s:%v", s.NetInterface, s.Port),
"Transfer port", fmt.Sprintf("%s:%v", s.NetInterface, s.Port+1),
)

var wg sync.WaitGroup

wg.Add(1)
Expand Down
3 changes: 0 additions & 3 deletions hotline/version.go

This file was deleted.

0 comments on commit f6f1d88

Please sign in to comment.