mirror of
https://github.com/bestnite/sub2clash.git
synced 2025-06-17 12:43:18 +08:00
♻️ Refactor code
🔥 Remove update detection
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user