Enforce use of any instead of interface{} (#30588)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9aa4818c71
Коммит
166a676fe5
@@ -425,8 +425,8 @@ type Role struct {
|
||||
BuiltIn bool `json:"built_in"`
|
||||
}
|
||||
|
||||
func (r *Role) Auditable() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
func (r *Role) Auditable() map[string]any {
|
||||
return map[string]any{
|
||||
"id": r.Id,
|
||||
"name": r.Name,
|
||||
"display_name": r.DisplayName,
|
||||
@@ -471,7 +471,7 @@ func (r *Role) MarshalYAML() (any, error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (r *Role) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
func (r *Role) UnmarshalYAML(unmarshal func(any) error) error {
|
||||
out := struct {
|
||||
Id string `yaml:"id"`
|
||||
Name string `yaml:"name"`
|
||||
@@ -522,8 +522,8 @@ type RolePatch struct {
|
||||
Permissions *[]string `json:"permissions"`
|
||||
}
|
||||
|
||||
func (r *RolePatch) Auditable() map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
func (r *RolePatch) Auditable() map[string]any {
|
||||
return map[string]any{
|
||||
"permissions": r.Permissions,
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user