Skip to content

Commit

Permalink
Merge pull request #898 from haiker2011/fix/regexp
Browse files Browse the repository at this point in the history
use raw string for regexp to avoid escape twice.
  • Loading branch information
ks-ci-bot committed Dec 17, 2021
2 parents 44d0263 + 51a879d commit f277f2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/kubekey/cluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ func currentClusterDiff(r *ClusterReconciler, ctx context.Context, c *kubekeyv1a
}

func findIpAddress(endpoint string) (string, error) {
ipv4Regexp, err := regexp.Compile("[\\d]+\\.[\\d]+\\.[\\d]+\\.[\\d]+")
ipv4Regexp, err := regexp.Compile(`[\d]+\.[\d]+\.[\d]+\.[\d]+`)
if err != nil {
return "", err
}
Expand Down

0 comments on commit f277f2a

Please sign in to comment.