diff --git a/internal/codegen/golang/imports.go b/internal/codegen/golang/imports.go index 2be8fad7d2..c1c4c9e762 100644 --- a/internal/codegen/golang/imports.go +++ b/internal/codegen/golang/imports.go @@ -188,7 +188,7 @@ func buildImports(settings *plugin.Settings, queries []Query, uses func(string) } } - for typeName, _ := range pqtypeTypes { + for typeName := range pqtypeTypes { if uses(typeName) { pkg[ImportSpec{Path: "github.com/sqlc-dev/pqtype"}] = struct{}{} break diff --git a/internal/codegen/golang/sqlite_type.go b/internal/codegen/golang/sqlite_type.go index 97c52ec101..168761f73c 100644 --- a/internal/codegen/golang/sqlite_type.go +++ b/internal/codegen/golang/sqlite_type.go @@ -5,6 +5,7 @@ import ( "strings" "github.com/kyleconroy/sqlc/internal/codegen/sdk" + "github.com/kyleconroy/sqlc/internal/debug" "github.com/kyleconroy/sqlc/internal/plugin" ) @@ -68,7 +69,10 @@ func sqliteType(req *plugin.CodeGenRequest, col *plugin.Column) string { return "sql.NullFloat64" default: - log.Printf("unknown SQLite type: %s\n", dt) + if debug.Active { + log.Printf("unknown SQLite type: %s\n", dt) + } + return "interface{}" }