MCPcopy Create free account
hub / github.com/goadesign/goa / fixReservedGo

Function fixReservedGo

codegen/goify.go:58–63  ·  view source on GitHub ↗

fixReservedGo appends an underscore on to Go reserved keywords.

(w string)

Source from the content-addressed store, hash-verified

56
57// fixReservedGo appends an underscore on to Go reserved keywords.
58func fixReservedGo(w string) string {
59 if doc.IsPredeclared(w) || token.IsKeyword(w) || isPackage[w] {
60 w += "_"
61 }
62 return w
63}
64
65var (
66 isPackage = map[string]bool{

Callers 2

GoifyFunction · 0.85
TestFixReservedGoFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFixReservedGoFunction · 0.68