MCPcopy Index your code
hub / github.com/Masterminds/structable / goName

Function goName

schema2struct/schema2struct.go:328–336  ·  view source on GitHub ↗

Convert a SQL name to a Go name.

(sqlName string)

Source from the content-addressed store, hash-verified

326
327// Convert a SQL name to a Go name.
328func goName(sqlName string) string {
329 // This can definitely be done better.
330 goName := strings.Replace(sqlName, "_", " ", -1)
331 goName = strings.Replace(goName, ".", " ", -1)
332 goName = strings.Title(goName)
333 goName = strings.Replace(goName, " ", "", -1)
334
335 return goName
336}

Callers 2

importTableFunction · 0.85
structFieldFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected