chore: replace interface with any

This commit is contained in:
Florian Schade
2026-04-23 09:31:11 +02:00
committed by Ralf Haferkamp
parent 8f26149743
commit 288e67cc39
138 changed files with 933 additions and 934 deletions
+3 -3
View File
@@ -697,7 +697,7 @@ func translateBundle(bundle *settingsmsg.Bundle, t *gotext.Locale) *settingsmsg.
// translate interval names ('Instant', 'Daily', 'Weekly', 'Never')
value := set.GetSingleChoiceValue()
for i, v := range value.GetOptions() {
value.Options[i].DisplayValue = t.Get(v.GetDisplayValue(), []interface{}{}...)
value.Options[i].DisplayValue = t.Get(v.GetDisplayValue(), []any{}...)
}
set.Value = &settingsmsg.Setting_SingleChoiceValue{SingleChoiceValue: value}
fallthrough
@@ -710,9 +710,9 @@ func translateBundle(bundle *settingsmsg.Bundle, t *gotext.Locale) *settingsmsg.
defaults.SettingUUIDProfileEventSpaceDisabled,
defaults.SettingUUIDProfileEventSpaceDeleted:
// translate event names ('Share Received', 'Share Removed', ...)
set.DisplayName = t.Get(set.GetDisplayName(), []interface{}{}...)
set.DisplayName = t.Get(set.GetDisplayName(), []any{}...)
// translate event descriptions ('Notify me when I receive a share', ...)
set.Description = t.Get(set.GetDescription(), []interface{}{}...)
set.Description = t.Get(set.GetDescription(), []any{}...)
bundle.Settings[i] = set
}
}
@@ -137,7 +137,7 @@ func validateListRoleAssignmentsFiltered(req *settingssvc.ListRoleAssignmentsFil
)
}
func validateUserRoleAssignmentFilter(values interface{}) error {
func validateUserRoleAssignmentFilter(values any) error {
filter, ok := values.(*settingsmsg.UserRoleAssignmentFilter)
if !ok {
return errors.New("expected UserRoleAssignmentFilter")
@@ -161,7 +161,7 @@ func validateUserRoleAssignmentFilter(values interface{}) error {
)
}
func validateFilterRoleID(value interface{}) error {
func validateFilterRoleID(value any) error {
roleTerm, ok := value.(*settingsmsg.UserRoleAssignmentFilter_RoleId)
if !ok {
return errors.New("expected UserRoleAssignmentFilter_RoleId")
@@ -169,7 +169,7 @@ func validateFilterRoleID(value interface{}) error {
return validation.Validate(&roleTerm.RoleId, is.UUID)
}
func validateFilterAccountUUID(value interface{}) error {
func validateFilterAccountUUID(value any) error {
accountTerm, ok := value.(*settingsmsg.UserRoleAssignmentFilter_AccountUuid)
if !ok {
return errors.New("expected UserRoleAssignmentFilter_AccountUuid")