packer-cn/builder/azure/common/client/normalize_location.go

10 lines
260 B
Go

package client
import "strings"
// NormalizeLocation returns a normalized location string.
// Strings are converted to lower case and spaces are removed.
func NormalizeLocation(loc string) string {
return strings.ReplaceAll(strings.ToLower(loc), " ", "")
}