Code refactoring (change interface to any)

This commit is contained in:
Alexey Khit
2023-03-17 06:44:40 +03:00
parent d4d91e4920
commit 2146ea470b
23 changed files with 54 additions and 54 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ func NewStream(source interface{}) *Stream {
prod := &Producer{url: source}
s.producers = append(s.producers, prod)
return s
case []interface{}:
case []any:
s := new(Stream)
for _, source := range source {
prod := &Producer{url: source.(string)}
@@ -33,7 +33,7 @@ func NewStream(source interface{}) *Stream {
return s
case *Stream:
return source
case map[string]interface{}:
case map[string]any:
return NewStream(source["url"])
case nil:
return new(Stream)