mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-15 00:17:30 -06:00
[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:
parent
65917f5bb9
commit
312cb8b9c7
7 changed files with 26 additions and 26 deletions
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue