Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+3 -3
View File
@@ -740,7 +740,7 @@ func (pts *PropertyTypes) HasType(pt PropertyType) bool {
}
func (pts *PropertyTypes) UnmarshalJSON(data []byte) error {
var value interface{}
var value any
if err := json.Unmarshal(data, &value); err != nil {
return err
}
@@ -749,7 +749,7 @@ func (pts *PropertyTypes) UnmarshalJSON(data []byte) error {
case string:
*pts = []PropertyType{PropertyType(val)}
return nil
case []interface{}:
case []any:
var pt []PropertyType
for _, t := range val {
s, ok := t.(string)
@@ -778,7 +778,7 @@ const (
)
type Any struct {
value interface{}
value any
}
func (u *Any) UnmarshalJSON(data []byte) error {
+1 -1
View File
@@ -348,7 +348,7 @@ func allowedTSVeneersString() string {
return strings.Join(list, "|")
}
func valError(v cue.Value, format string, args ...interface{}) error {
func valError(v cue.Value, format string, args ...any) error {
s := v.Source()
if s == nil {
return fmt.Errorf(format, args...)