From 202565c05994fcdfaf34c5462e6a7b786feeec34 Mon Sep 17 00:00:00 2001 From: lekko-jonathan <150070021+lekko-jonathan@users.noreply.github.com> Date: Tue, 7 May 2024 10:18:01 -0700 Subject: [PATCH] Allow people to write the public functions (#381) --- pkg/sync/golang.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sync/golang.go b/pkg/sync/golang.go index 402fd7f2..e984e144 100644 --- a/pkg/sync/golang.go +++ b/pkg/sync/golang.go @@ -158,7 +158,7 @@ func (g *goSyncer) FileLocationToNamespace(ctx context.Context) (*Namespace, err case *ast.FuncDecl: // TODO: We should support numbers (e.g. v2) but the strcase pkg has some non-ideal behavior with numbers, // we might want to write our own librar(ies) with cross-language consistency - if regexp.MustCompile("^get[A-Z][A-Za-z]*$").MatchString(x.Name.Name) { + if regexp.MustCompile("^[gG]et[A-Z][A-Za-z]*$").MatchString(x.Name.Name) { var commentLines []string if x.Doc != nil { for _, comment := range x.Doc.List {