Browse Source

Assets version constant to global

Vova Tkach 6 years ago
parent
commit
be8a499719
2 changed files with 2 additions and 3 deletions
  1. 1 0
      constants/constants.go
  2. 1 3
      engine/wrapper/wrapper.go

+ 1 - 0
constants/constants.go

@@ -1,3 +1,4 @@
 package constants
 
 const Debug = !false
+const AssetsVersion = "3"

+ 1 - 3
engine/wrapper/wrapper.go

@@ -13,8 +13,6 @@ import (
 	templates "golang-fave/engine/wrapper/resources/templates"
 )
 
-const C_AssetsVersion = "3"
-
 type handleRun func(wrapper *Wrapper) bool
 
 type tmplDataSystem struct {
@@ -49,7 +47,7 @@ type Wrapper struct {
 }
 
 func (this *Wrapper) tmplGetSystemData() tmplDataSystem {
-	version := "?v=" + C_AssetsVersion
+	version := "?v=" + constants.AssetsVersion
 	return tmplDataSystem{
 		PathIcoFav:       this.R.URL.Scheme + "://" + this.R.Host + "/assets/sys/fave.ico" + version,
 		PathSvgLogo:      this.R.URL.Scheme + "://" + this.R.Host + "/assets/sys/logo.svg" + version,