feat: 🏡 make apps
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
|
||||
"gitea.loveuer.com/yizhisec/pkg3/logger"
|
||||
"yizhisec.com/hsv2/forge/internal/opt"
|
||||
@@ -30,7 +29,7 @@ func WithMySQLReplica(replica int) MysqlOpt {
|
||||
func WithMySQLStorage(storage string) MysqlOpt {
|
||||
return func(o *mysqlOpt) {
|
||||
// validate Kubernetes storage size string (e.g., "50Gi", "100Mi")
|
||||
if matched, _ := regexp.MatchString(`^\d+(\.\d+)?[EPTGMK]i?$`, storage); matched {
|
||||
if opt.StorageSizeReg.MatchString(storage) {
|
||||
o.Storage = storage
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user