1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

version bump: get actual birdwatcher version in request

This commit is contained in:
hellerve 2017-01-26 12:12:02 +01:00
parent a2c829c34a
commit 87252032bf
3 changed files with 9 additions and 2 deletions

View file

@ -1 +1 @@
1.7.4
1.7.5

View file

@ -12,6 +12,9 @@ import (
"github.com/julienschmidt/httprouter"
)
//go:generate versionize
var VERSION = "1.7.5"
func isModuleEnabled(module string, modulesEnabled []string) bool {
for _, enabled := range modulesEnabled {
if enabled == module {
@ -93,6 +96,7 @@ func main() {
bird6 := flag.Bool("6", false, "Use bird6 instead of bird")
flag.Parse()
endpoints.VERSION = VERSION
bird.InstallRateLimitReset()
// Load configurations
conf, err := LoadConfigs([]string{

View file

@ -17,10 +17,13 @@ type APIInfo struct {
CacheStatus CacheStatus `json:"cache_status"`
}
// go generate does not work in subdirectories. Beautious.
var VERSION string
func GetApiInfo(from_cache bool) *APIInfo {
ai := &APIInfo{}
ai.Version = "1.0"
ai.Version = VERSION
ai.ResultFromCache = from_cache
return ai