change order of TrimSpace and ToLower for minor perf improvement

This commit is contained in:
Johannes Batzill 2023-06-26 11:42:48 -07:00
parent 59e3bff412
commit bac1777e38

View File

@ -20,7 +20,7 @@ const (
) )
func ParseType(profilerType string) (Type, bool) { func ParseType(profilerType string) (Type, bool) {
switch strings.TrimSpace(strings.ToLower(profilerType)) { switch strings.ToLower(strings.TrimSpace(profilerType)) {
case string(TypeGCP): case string(TypeGCP):
return TypeGCP, true return TypeGCP, true
default: default: