diff --git a/README.md b/README.md index eea35e4..5c414bd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,12 @@ CLI that generates a go project with the most common stacks of your choice. -## Install +Currently it supports only database agnostic sql code generators (like query builders and so). +Still working on supporting ORM's. + +Feel free to contribute to this project! + +## Installation First, make sure that you have Go installed an GOPATH set in your machine. diff --git a/go.mod b/go.mod index c3c935d..7594203 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/buger/goterm v1.0.4 - github.com/samluiz/goselcli v0.1.2 + github.com/samluiz/goselcli v0.1.4 ) require ( diff --git a/go.sum b/go.sum index 405b8f4..fc98382 100644 --- a/go.sum +++ b/go.sum @@ -41,8 +41,8 @@ github.com/pterm/pterm v0.12.40 h1:LvQE43RYegVH+y5sCDcqjlbsRu0DlAecEn9FDfs9ePs= github.com/pterm/pterm v0.12.40/go.mod h1:ffwPLwlbXxP+rxT0GsgDTzS3y3rmpAO1NMjUkGTYf8s= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/samluiz/goselcli v0.1.2 h1:aFLJCk5wvdgTxppkJ68codPvpNsC6DUaf7mDKK0mTDI= -github.com/samluiz/goselcli v0.1.2/go.mod h1:KhFq7ZDHtO90jNtNEC3k0bryKsP7WT4T2EnVwiunAU4= +github.com/samluiz/goselcli v0.1.4 h1:HZ+uEPXOeoNTTY+19QhoRW0upcCALPbr1niifTkGEMM= +github.com/samluiz/goselcli v0.1.4/go.mod h1:KhFq7ZDHtO90jNtNEC3k0bryKsP7WT4T2EnVwiunAU4= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/internal/cli/options/sqlcodegens/sqlcodegens.go b/internal/cli/options/sqlcodegens/sqlcodegens.go index ff11935..bf6aaae 100644 --- a/internal/cli/options/sqlcodegens/sqlcodegens.go +++ b/internal/cli/options/sqlcodegens/sqlcodegens.go @@ -12,38 +12,28 @@ var ( Package: "", ID: "0", } - SQLC = SQLCodeGenModule{ - Name: "SQLC", - Package: "github.com/kyleconroy/sqlc", - ID: "1", - } SQUIRREL = SQLCodeGenModule{ Name: "Squirrel", Package: "github.com/Masterminds/squirrel", - ID: "2", + ID: "1", } SQLZ = SQLCodeGenModule{ Name: "SQLZ", - Package: "github.com/ulule/sqlz", - ID: "3", + Package: "github.com/ido50/sqlz", + ID: "2", } GOQU = SQLCodeGenModule{ Name: "Goqu", - Package: "github.com/doug-martin/goqu", - ID: "4", - } - HOOD = SQLCodeGenModule{ - Name: "Hood", - Package: "github.com/eaigner/hood", - ID: "5", + Package: "github.com/doug-martin/goqu/v9", + ID: "3", } ) var SQLCodeGens = []SQLCodeGenModule{ NO_SQL_CODEGEN, - SQLC, SQUIRREL, SQLZ, + GOQU, } func GetSQLCodeGenModuleById(id string) SQLCodeGenModule { @@ -51,11 +41,11 @@ func GetSQLCodeGenModuleById(id string) SQLCodeGenModule { case "0": return NO_SQL_CODEGEN case "1": - return SQLC - case "2": return SQUIRREL - case "3": + case "2": return SQLZ + case "3": + return GOQU default: return SQLCodeGenModule{} } diff --git a/main.go b/main.go index fe9f23e..be0fde4 100644 --- a/main.go +++ b/main.go @@ -64,7 +64,7 @@ func main() { versionInfo := GetVersionInfo() fmt.Print(banner) if displayVersion { - fmt.Printf("\nversion: %s\ngo Version: %s\n", versionInfo.goinitversion, versionInfo.goversion) + fmt.Printf("\nversion: %s\ngo version: %s\n", versionInfo.goinitversion, versionInfo.goversion) return } cli.Run(os.Stdin)