fraenky8 / tables-to-go

convert your database tables to structs easily
MIT License
233 stars 42 forks source link

go:build comment without // +build comment #39

Closed Tifinity closed 2 years ago

Tifinity commented 2 years ago

I run go get,and it report this error: internal/cli/tables-to-go-cli.go:12:2: //go:build comment without // +build comment

fraenky8 commented 2 years ago

@Tifinity what's your go version?

Tifinity commented 2 years ago

go1.16.6 darwin/arm64 mac m1

fraenky8 commented 2 years ago

Thats odd, there is no such build tags in this file but in pkg/database/sqlite_driver.go.

What I can say is, that this build constraint follows the new syntax as introduced in Go v1.17. Also this tool requires Go 1.17.

But good catch, I will update the Readme and use both, old and new build constraints as mentioned in the release notes.

fraenky8 commented 2 years ago

@Tifinity I updated in #40 - can you try to run the following:

go install github.com/fraenky8/tables-to-go@master
Tifinity commented 2 years ago
  1. Thanks, does need 1.17+ to install correctly
  2. 40, use 1.16 is also ok

Thank you very much, your solution is in time

fraenky8 commented 2 years ago

Awesome! Glad to hear it works! 👍