wireguard-dashboard/global/constant/common_constant.go
2024-07-05 14:41:35 +08:00

23 lines
288 B
Go

package constant
// Status 启用禁用
type Status int
const (
Disabled Status = iota
Enabled
)
var StatusMap = map[Status]string{
Disabled: "禁用",
Enabled: "启用",
}
func (u Status) String() string {
if v, ok := StatusMap[u]; ok {
return v
}
return "未知类型"
}