[chore] rename New___(string) int signature functions to Parse___(string) int (#3580)

* rename New___(string) int {} signature functions to Parse___(string) int {}

* remove test output
This commit is contained in:
kim 2024-11-28 11:54:22 +00:00 committed by GitHub
commit 312cb8b9c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 26 additions and 26 deletions

View file

@ -19,6 +19,7 @@ package gtsmodel
import (
"path"
"strings"
"time"
)
@ -46,8 +47,8 @@ func (c AdminActionCategory) String() string {
}
}
func NewAdminActionCategory(in string) AdminActionCategory {
switch in {
func ParseAdminActionCategory(in string) AdminActionCategory {
switch strings.ToLower(in) {
case "account":
return AdminActionCategoryAccount
case "domain":
@ -96,8 +97,8 @@ func (t AdminActionType) String() string {
}
}
func NewAdminActionType(in string) AdminActionType {
switch in {
func ParseAdminActionType(in string) AdminActionType {
switch strings.ToLower(in) {
case "disable":
return AdminActionDisable
case "reenable":