Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refact: improve message builder for go build #6

Open
ermos opened this issue Mar 3, 2023 · 0 comments
Open

refact: improve message builder for go build #6

ermos opened this issue Mar 3, 2023 · 0 comments
Assignees
Labels
cmd-build requests about build command lang-go request about go support refact requests to improve existing features

Comments

@ermos
Copy link
Owner

ermos commented Mar 3, 2023

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.

@ermos ermos added refact requests to improve existing features lang-go request about go support cmd-build requests about build command labels Mar 3, 2023
@ermos ermos self-assigned this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd-build requests about build command lang-go request about go support refact requests to improve existing features
Projects
None yet
Development

No branches or pull requests

1 participant