From aaa5d2ab6686cc26546f09688656bdff9b1229da Mon Sep 17 00:00:00 2001 From: katexochen <49727155+katexochen@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:36:32 +0200 Subject: [PATCH] Replace deprecated strings.Title --- cli/cloud/cloudtypes/firewall.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/cloud/cloudtypes/firewall.go b/cli/cloud/cloudtypes/firewall.go index 939a7fa03..5685c6b49 100644 --- a/cli/cloud/cloudtypes/firewall.go +++ b/cli/cloud/cloudtypes/firewall.go @@ -2,11 +2,12 @@ package cloudtypes import ( "fmt" - "strings" "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork" ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types" "github.com/edgelesssys/constellation/internal/config" + "golang.org/x/text/cases" + "golang.org/x/text/language" computepb "google.golang.org/genproto/googleapis/cloud/compute/v1" "google.golang.org/protobuf/proto" ) @@ -46,7 +47,7 @@ func (f Firewall) Azure() ([]*armnetwork.SecurityRule, error) { var fw []*armnetwork.SecurityRule for i, rule := range f { // format string according to armnetwork.SecurityRuleProtocol specification - protocol := strings.Title(strings.ToLower(rule.Protocol)) + protocol := cases.Title(language.English).String(rule.Protocol) dstPortRange, err := portOrRange(rule.FromPort, rule.ToPort) if err != nil {