chore: code clean

This commit is contained in:
Steven
2023-07-04 21:22:47 +08:00
parent f0334d5755
commit ee9e092129
3 changed files with 4 additions and 11 deletions

View File

@ -13,11 +13,8 @@ const (
)
// String returns the string format of UserSettingKey type.
func (key UserSettingKey) String() string {
if key == UserSettingLocaleKey {
return "locale"
}
return ""
func (k UserSettingKey) String() string {
return string(k)
}
var (
@ -27,7 +24,7 @@ var (
type UserSetting struct {
UserID int
Key UserSettingKey `json:"key"`
// Value is a JSON string with basic value
// Value is a JSON string with basic value.
Value string `json:"value"`
}