feat: 修改短链

update: dockerfile,workflow
This commit is contained in:
2024-03-13 13:30:45 +08:00
parent 1d9de31f47
commit 14c3b97ed2
19 changed files with 609 additions and 527 deletions

View File

@ -3,6 +3,7 @@ package config
import (
"errors"
"os"
"regexp"
"strconv"
"github.com/joho/godotenv"
@ -24,6 +25,15 @@ 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",