mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/promscrape/discovery/gce: make golangci-lint happy
This commit is contained in:
parent
86a1d9cb0c
commit
a603a15757
1 changed files with 3 additions and 3 deletions
|
@ -29,11 +29,11 @@ func (z *ZoneYAML) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||
return err
|
||||
}
|
||||
var zones []string
|
||||
switch v.(type) {
|
||||
switch t := v.(type) {
|
||||
case string:
|
||||
zones = []string{v.(string)}
|
||||
zones = []string{t}
|
||||
case []interface{}:
|
||||
for _, vv := range v.([]interface{}) {
|
||||
for _, vv := range t {
|
||||
zone, ok := vv.(string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected zone type detected: %T; contents: %#v", vv, vv)
|
||||
|
|
Loading…
Reference in a new issue