Closed PhilippSeitz closed 4 years ago
@PhilippSeitz it's just for simplicity. Can you make a PR to make it customizable?
took a deeper look into the code and saw that it's already possible.
I just had to use the pgadapter.NewAdapterByDB(db)
instead.
for example:
opts, _ := pg.ParseURL("postgresql://username:password@postgres:5432/database?sslmode=disable")
db := pg.Connect(opts)
a, err := pgadapter.NewAdapterByDB(db)
@hsluoyz i can add the example to the readme.
Sure. Please add it. Thanks!
Hello, great Adapter! but why does the database has to be called
casbin
? Makes it hard to use in a managed service environmenthttps://github.com/casbin/casbin-pg-adapter/blob/56c866ff405eb7083188cced8a82bc7f8b5408f9/adapter.go#L104