feat: add server name and version to all responses
This is inline with other Subsonic compatible servers, like funkwhale, madsonic, ampache...
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package consts
|
||||
|
||||
import "fmt"
|
||||
|
||||
var (
|
||||
// This will be set in build time. If not, version will be set to "dev"
|
||||
gitTag string
|
||||
gitSha string
|
||||
)
|
||||
|
||||
// Formats:
|
||||
// dev
|
||||
// v0.2.0 (5b84188)
|
||||
// master (9ed35cb)
|
||||
func Version() string {
|
||||
if gitSha == "" {
|
||||
return "dev"
|
||||
}
|
||||
return fmt.Sprintf("%s (%s)", gitTag, gitSha)
|
||||
}
|
||||
Reference in New Issue
Block a user