Skip to content

Commit

Permalink
lint: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminch committed Oct 18, 2024
1 parent c02311e commit 62e89f6
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions pkg/gcp/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/Qovery/pleco/pkg/common"
log "github.com/sirupsen/logrus"
"golang.org/x/net/context"
"regexp"
"strconv"
"time"
)
Expand Down Expand Up @@ -207,20 +206,3 @@ func DeleteExpiredVPCs(sessions GCPSessions, options GCPOptions) {
}

}

func extractRegionAndSubnetwork(subnetwork string) (string, string, error) {
// Define the regex pattern
re := regexp.MustCompile(`regions/([^/]+)/subnetworks/([^/]+)`)

// Find the matches
matches := re.FindStringSubmatch(subnetwork)
if len(matches) < 3 {
return "", "", fmt.Errorf("no matches found in URL")
}

// Extract the region and subnetwork from the matches
region := matches[1]
subnet := matches[2]

return region, subnet, nil
}

0 comments on commit 62e89f6

Please sign in to comment.