Skip to content

Commit

Permalink
fix: escape regex dots (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody authored Aug 24, 2023
1 parent 3d39aa2 commit 0da46e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/asset/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func ConvertToAdmissionRequest(asset map[string]interface{}) (*admissionv1beta1.

// k8s assset names will follow pattern:
// //container.googleapis.com/projects/*/(locations|zones)/*/clusters/*/k8s
var assetPath = regexp.MustCompile(`^//container.googleapis.com/projects/[^/]*/(locations|zones)/[^/]*/clusters/[^/]*/k8s`)
var assetPath = regexp.MustCompile(`^//container\.googleapis\.com/projects/[^/]*/(locations|zones)/[^/]*/clusters/[^/]*/k8s`)

// IsK8S returns true if the CAI asset is an asset from a kubernetes cluster.
func IsK8S(asset map[string]interface{}) bool {
Expand Down

0 comments on commit 0da46e6

Please sign in to comment.