Remove user-facing new-api naming; Docker/network/container names use heicode. Go imports updated; Dockerfiles and workflows ldflags fixed. Made-with: Cursor
38 lines
644 B
Go
38 lines
644 B
Go
package setting
|
|
|
|
import (
|
|
"github.com/heicode/manager/common"
|
|
)
|
|
|
|
var autoGroups = []string{
|
|
"default",
|
|
}
|
|
|
|
var DefaultUseAutoGroup = false
|
|
|
|
func ContainsAutoGroup(group string) bool {
|
|
for _, autoGroup := range autoGroups {
|
|
if autoGroup == group {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func UpdateAutoGroupsByJsonString(jsonString string) error {
|
|
autoGroups = make([]string, 0)
|
|
return common.Unmarshal([]byte(jsonString), &autoGroups)
|
|
}
|
|
|
|
func AutoGroups2JsonString() string {
|
|
jsonBytes, err := common.Marshal(autoGroups)
|
|
if err != nil {
|
|
return "[]"
|
|
}
|
|
return string(jsonBytes)
|
|
}
|
|
|
|
func GetAutoGroups() []string {
|
|
return autoGroups
|
|
}
|