Skip to content

Commit

Permalink
fix: regex check
Browse files Browse the repository at this point in the history
  • Loading branch information
ssvaidyanathan committed May 24, 2024
1 parent a58619c commit 93df4e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/endpoints/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ var CreateCmd = &cobra.Command{
re := regexp.MustCompile(`projects\/([a-zA-Z0-9_-]+)\/regions` +
`\/([a-zA-Z0-9_-]+)\/serviceAttachments\/([a-zA-Z0-9_-]+)`)

if ok := re.Match([]byte(name)); !ok {
return fmt.Errorf("the service atachment does not match the required format")
if ok := re.Match([]byte(serviceAttachment)); !ok {
return fmt.Errorf("The service attachment does not match the required format")
}

_, err = connections.CreateEndpoint(name, serviceAttachment, description, wait)
Expand Down

0 comments on commit 93df4e6

Please sign in to comment.