kislerdm / terraform-provider-neon

Terraform provider to manage Neon SaaS resources
https://registry.terraform.io/providers/kislerdm/neon/latest/docs
Mozilla Public License 2.0
27 stars 10 forks source link

HasPrefix uses wrong parameter order #55

Closed mettke closed 8 months ago

mettke commented 9 months ago

According to the Go Documentation the HasPrefix Function has its parameters swapped. This is how it is:

func isValidBranchID(s string) bool {
    return strings.HasPrefix("br-", s)
}

And this is how it should be:

func isValidBranchID(s string) bool {
    return strings.HasPrefix(s, "br-")
}