框架基本搭建完成

This commit is contained in:
2022-04-03 12:30:50 +08:00
commit ec4c957b25
31 changed files with 1353 additions and 0 deletions

18
pkg/global/global.go Normal file
View File

@@ -0,0 +1,18 @@
package global
import "fmt"
type Version struct {
Major int32
Minor int32
Patch int32
Tag string
}
func (v *Version) String() string {
vs := fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch)
if v.Tag == "" {
vs = vs + "-" + v.Tag
}
return vs
}