Skip to content

Commit

Permalink
fix(client): rename Config -> PrismaConfig (#1076)
Browse files Browse the repository at this point in the history
Prevents collision with models named `Client`.
  • Loading branch information
steebchen authored Nov 2, 2023
1 parent 3189ae2 commit 5db5ff1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generator/templates/client.gotpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ var hasBinaryTargets = {{ $hasBinaryTargets }}
// panic(fmt.Errorf("could not disconnect: %w", err))
// }
// }()
func NewClient(options ...func(config *Config)) *PrismaClient {
var config Config
func NewClient(options ...func(config *PrismaConfig)) *PrismaClient {
var config PrismaConfig
for _, option := range options {
option(&config)
}
Expand Down Expand Up @@ -62,12 +62,12 @@ func NewClient(options ...func(config *Config)) *PrismaClient {
return c
}

type Config struct {
type PrismaConfig struct {
datasourceURL string
}

func WithDatasourceURL(url string) func(*Config) {
return func(config *Config) {
func WithDatasourceURL(url string) func(*PrismaConfig) {
return func(config *PrismaConfig) {
config.datasourceURL = url
}
}
Expand Down

0 comments on commit 5db5ff1

Please sign in to comment.