Enforce use of any instead of interface{} (#30588)

Этот коммит содержится в:
Ben Schumacher
2025-03-31 10:44:34 +02:00
коммит произвёл GitHub
родитель 9aa4818c71
Коммит 166a676fe5
78 изменённых файлов: 268 добавлений и 262 удалений

Просмотреть файл

@@ -112,8 +112,8 @@ type User struct {
MfaUsedTimestamps StringArray `json:"mfa_used_timestamps,omitempty"`
}
func (u *User) Auditable() map[string]interface{} {
return map[string]interface{}{
func (u *User) Auditable() map[string]any {
return map[string]any{
"id": u.Id,
"create_at": u.CreateAt,
"update_at": u.UpdateAt,
@@ -145,7 +145,7 @@ func (u *User) Auditable() map[string]interface{} {
}
func (u *User) LogClone() any {
return map[string]interface{}{
return map[string]any{
"id": u.Id,
"create_at": u.CreateAt,
"update_at": u.UpdateAt,
@@ -195,8 +195,8 @@ type UserPatch struct {
RemoteId *string `json:"remote_id"`
}
func (u *UserPatch) Auditable() map[string]interface{} {
return map[string]interface{}{
func (u *UserPatch) Auditable() map[string]any {
return map[string]any{
"username": u.Username,
"nickname": u.Nickname,
"first_name": u.FirstName,
@@ -217,8 +217,8 @@ type UserAuth struct {
AuthService string `json:"auth_service,omitempty"`
}
func (u *UserAuth) Auditable() map[string]interface{} {
return map[string]interface{}{
func (u *UserAuth) Auditable() map[string]any {
return map[string]any{
"auth_service": u.AuthService,
}
}