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

Syntax error when trying to build golang docker #30

Open
slackale opened this issue Sep 13, 2023 · 1 comment
Open

Syntax error when trying to build golang docker #30

slackale opened this issue Sep 13, 2023 · 1 comment
Assignees

Comments

@slackale
Copy link

slackale commented Sep 13, 2023

Greetings.

CGO_ENABLED=0 go build -tags=jsoniter -o binary .

/go/src/github.com/jinzhu/inflection/inflections.go:123:24: syntax error: unexpected newline in composite literal; possibly missing comma or }

docker image version: golang:1.18, golang:1.19

Thanks.

@sogko
Copy link
Contributor

sogko commented Oct 5, 2023

+1 Encountered same error when trying to go get gorm.io/gorm (which uses this package)

$ go get gorm.io/gorm
# github.com/jinzhu/inflection
../../jinzhu/inflection/inflections.go:123:24: syntax error: unexpected newline in composite literal; possibly missing comma or }

$  go version
go version go1.20.1 darwin/arm64

Should be fixed by #29 and #28.

A little digging showed that this error was introduced in PR #27

Workaround: use go mod

$ cd your_project
$ go mod init # if not already initialised
$ go get gorm.io/gorm

go: downloading gorm.io/gorm v1.25.5
go: added github.com/jinzhu/inflection v1.0.0
go: added github.com/jinzhu/now v1.1.5
go: added gorm.io/gorm v1.25.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants