mirror of
https://github.com/elyby/chrly.git
synced 2024-12-23 21:50:03 +05:30
Resolves #20. Print Chrly's version during server startup.
This commit is contained in:
parent
dbefac0e84
commit
2d555d9253
@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased] - xxxx-xx-xx
|
## [Unreleased] - xxxx-xx-xx
|
||||||
### Added
|
### Added
|
||||||
- [#20](https://github.com/elyby/chrly/issues/20): Print hostname in the `version` command output.
|
- [#20](https://github.com/elyby/chrly/issues/20): Print hostname in the `version` command output.
|
||||||
|
- [#21](https://github.com/elyby/chrly/issues/21): Print Chrly's version during server startup.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#22](https://github.com/elyby/chrly/issues/22): Correct version passing during building of the Docker image.
|
- [#22](https://github.com/elyby/chrly/issues/22): Correct version passing during building of the Docker image.
|
||||||
|
@ -13,6 +13,7 @@ import (
|
|||||||
"github.com/mono83/slf/wd"
|
"github.com/mono83/slf/wd"
|
||||||
|
|
||||||
"github.com/elyby/chrly/dispatcher"
|
"github.com/elyby/chrly/dispatcher"
|
||||||
|
v "github.com/elyby/chrly/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Emitter interface {
|
type Emitter interface {
|
||||||
@ -20,6 +21,8 @@ type Emitter interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func StartServer(server *http.Server, logger slf.Logger) {
|
func StartServer(server *http.Server, logger slf.Logger) {
|
||||||
|
logger.Debug("Chrly :v (:c)", wd.StringParam("v", v.Version()), wd.StringParam("c", v.Commit()))
|
||||||
|
|
||||||
done := make(chan bool, 1)
|
done := make(chan bool, 1)
|
||||||
go func() {
|
go func() {
|
||||||
logger.Info("Starting the server, HTTP on: :addr", wd.StringParam("addr", server.Addr))
|
logger.Info("Starting the server, HTTP on: :addr", wd.StringParam("addr", server.Addr))
|
||||||
|
Loading…
Reference in New Issue
Block a user