Skip to content

refact: improve message builder for go build #6

@ermos

Description

@ermos

Currently, we extends the base message builder that didn't fit with go syntax :

func messageBuilder(b *strlang.Golang, v interface{}) {
	base.MessageBuilder(b.Builder, nil, v, true, map[string]string{
		"key":        `"%v": `,
		"arrayStart": "[]interface{} {\n",
		"arrayEnd":   "}",
		"mapStart":   "map[string]interface{} {\n",
		"mapEnd":     "}",
		"string":     `"%s"`,
		"number":     "%v",
		"separator":  ",\n",
		"close":      "\n",
		"quote":      "\"",
	})
}

Everything into a map became a interface{}, the goal should be to detect type if the map didn't contains multiple type value.

Metadata

Metadata

Assignees

Labels

cmd-buildrequests about build commandlang-gorequest about go supportrefactrequests to improve existing features

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions