♻️ Refactor code

🔥 Remove update detection
This commit is contained in:
2024-04-23 14:47:53 +08:00
parent ebc91d8aad
commit ac4ad3c8aa
16 changed files with 39 additions and 94 deletions

View File

@ -3,7 +3,6 @@ package config
import (
"errors"
"os"
"regexp"
"strconv"
"github.com/joho/godotenv"
@ -22,18 +21,8 @@ type Config struct {
}
var Default *Config
var Version string
var Dev string
func init() {
reg := regexp.MustCompile(`^v\d+\.\d+\.\d+$`)
if reg.MatchString(Version) {
Dev = "false"
} else {
Dev = "true"
}
}
func LoadConfig() error {
Default = &Config{
MetaTemplate: "template_meta.yaml",