github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/pkg/scanners/azure/functions/pick_zones.go (about) 1 package functions 2 3 func PickZones(args ...interface{}) interface{} { 4 if len(args) < 3 { 5 return nil 6 } 7 numOfZones := 1 8 9 if len(args) > 3 { 10 numOfZones = args[3].(int) 11 if numOfZones > 3 { 12 numOfZones = 3 13 } 14 } 15 16 var zones []int 17 18 for i := 1; i <= numOfZones; i++ { 19 zones = append(zones, i) 20 } 21 22 return zones 23 }