Skip to content

Generate Postgres field: $Сумма #193

@ManyakRus

Description

@ManyakRus

Generate Postgres
not work with field name: $Сумма
panic: reflect.StructOf: field "_Сумма" is unexported but missing PkgPath

fixed:
// Replace takes a template based name format and will render a name using it
func Replace(nameFormat, name string) string {
var tpl bytes.Buffer
//fmt.Printf("Replace: %s\n",nameFormat)
t := template.Must(template.New("t1").Funcs(replaceFuncMap).Parse(nameFormat))

//sanek start
if name[0:1] == "$" {
	name = name[1:] + "$"
}
//sanek end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions