From 02f836a94f19e02b3c96d54d034eade4ddeedb29 Mon Sep 17 00:00:00 2001 From: Luca Steeb Date: Wed, 22 Sep 2021 00:42:17 +0700 Subject: [PATCH] fix(mod): revert "move no-op imports to main.go" (#585) --- generator/templates/_header.gotpl | 6 ++++++ go.mod | 4 ++-- go.sum | 4 ++-- main.go | 6 ------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/generator/templates/_header.gotpl b/generator/templates/_header.gotpl index d37ae147..53d8ebeb 100644 --- a/generator/templates/_header.gotpl +++ b/generator/templates/_header.gotpl @@ -16,6 +16,12 @@ import ( "github.com/prisma/prisma-client-go/runtime/raw" "github.com/prisma/prisma-client-go/runtime/builder" "github.com/prisma/prisma-client-go/runtime/transaction" + + // no-op import for go modules + _ "github.com/shopspring/decimal" + _ "github.com/iancoleman/strcase" + _ "github.com/takuoki/gocase" + _ "github.com/joho/godotenv" ) // re-declare variables which are needed in Prisma Client Go but also should be exported diff --git a/go.mod b/go.mod index 0b2a22b1..0d44822c 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/prisma/prisma-client-go go 1.16 require ( - github.com/iancoleman/strcase v0.2.0 - github.com/joho/godotenv v1.3.0 + github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 + github.com/joho/godotenv v1.3.0 // indirect github.com/shopspring/decimal v1.2.0 github.com/stretchr/testify v1.4.0 github.com/takuoki/gocase v1.0.0 diff --git a/go.sum b/go.sum index 4f9a250e..d1098e00 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 h1:ECW73yc9MY7935nNYXUkK7Dz17YuSUI9yqRqYS8aBww= +github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365/go.mod h1:SK73tn/9oHe+/Y0h39VT4UCxmurVJkR5NA7kMEAOgSE= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/main.go b/main.go index 4917ddcc..99965f02 100644 --- a/main.go +++ b/main.go @@ -8,12 +8,6 @@ import ( "github.com/prisma/prisma-client-go/cli" "github.com/prisma/prisma-client-go/logger" - - // ensure imports can be detected by go.mod - _ "github.com/iancoleman/strcase" - _ "github.com/joho/godotenv" - _ "github.com/shopspring/decimal" - _ "github.com/takuoki/gocase" ) func main() {