mirror of
				https://github.com/elyby/chrly.git
				synced 2025-05-31 14:11:51 +05:30 
			
		
		
		
	Resolves #20. Print Chrly's version during server startup.
This commit is contained in:
		| @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | ||||
| ## [Unreleased] - xxxx-xx-xx | ||||
| ### Added | ||||
| - [#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 | ||||
| - [#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/elyby/chrly/dispatcher" | ||||
| 	v "github.com/elyby/chrly/version" | ||||
| ) | ||||
|  | ||||
| type Emitter interface { | ||||
| @@ -20,6 +21,8 @@ type Emitter interface { | ||||
| } | ||||
|  | ||||
| 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) | ||||
| 	go func() { | ||||
| 		logger.Info("Starting the server, HTTP on: :addr", wd.StringParam("addr", server.Addr)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user