risor-io / risor

Fast and flexible scripting for Go developers and DevOps.
https://risor.io
Apache License 2.0
581 stars 24 forks source link

strings.has_prefix is accidentally overwritten #174

Closed myzie closed 6 months ago

myzie commented 6 months ago

Copy-paste error leads to code generation error that overwrites the strings.has_prefix function.

https://github.com/risor-io/risor/blob/main/modules/strings/strings.go#L19

//risor:export has_prefix
func hasSuffix(s, suffix string) bool {
    return strings.HasSuffix(s, suffix)
}

cc @applejag