mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 19:32:26 +00:00
- Modify .luarc.json to include global Lua scripts. - Update Makefile to include LDFLAGS for versioning. - Enhance node.go to implement version checking and update handling. - Refactor Lua global variables in _globals.lua and echo.lua to use new structures. - Remove deprecated http.lua and update config.yaml for TLS and update settings. - Introduce new update.go for version management and update checking. - Add tests for version comparison in update_test.go. - Improve error handling in various server methods.
30 lines
883 B
Go
30 lines
883 B
Go
package config
|
|
|
|
var UUIDLength int = 4
|
|
|
|
var ApiRoute string = "/api/{ver}"
|
|
var ComDirRoute string = "/com"
|
|
|
|
var NodeVersion string
|
|
var ActualFileNanme string = "actual.txt"
|
|
|
|
type _internalConsts struct{}
|
|
type _serverConsts struct{}
|
|
type _updateConsts struct{}
|
|
|
|
func GetUpdateConsts() _updateConsts { return _updateConsts{} }
|
|
func (_ _updateConsts) GetNodeVersion() string {
|
|
if NodeVersion == "" {
|
|
return "version0.0.0-none"
|
|
}
|
|
return NodeVersion
|
|
}
|
|
func (_ _updateConsts) GetActualFileName() string { return ActualFileNanme }
|
|
|
|
func GetInternalConsts() _internalConsts { return _internalConsts{} }
|
|
func (_ _internalConsts) GetUUIDLength() int { return UUIDLength }
|
|
|
|
func GetServerConsts() _serverConsts { return _serverConsts{} }
|
|
func (_ _serverConsts) GetApiRoute() string { return ApiRoute }
|
|
func (_ _serverConsts) GetComDirRoute() string { return ComDirRoute }
|