initial app

This commit is contained in:
Arnie
2023-06-01 20:24:59 +02:00
parent bb19e15a40
commit 34993f7f61
64 changed files with 10002 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
package version
import (
"encoding/json"
"time"
)
var (
JSON []byte
Commit string
CommitTime time.Time
Tag string
commitTime string
repoUrl string
)
func init() {
t, _ := time.Parse(time.RFC3339, commitTime)
CommitTime = t.In(time.UTC)
type v struct {
Source string `json:"source,omitempty"`
Version string `json:"version,omitempty"`
Commit string `json:"commit,omitempty"`
CommitTime time.Time `json:"commitTime,omitempty"`
}
JSON, _ = json.Marshal(v{
Source: repoUrl,
Version: Tag,
Commit: Commit,
CommitTime: CommitTime,
})
}