mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 10:12:35 +00:00
Backend() functions should return 'backend' objects.
If they return pointers to 'framework.Backend' objects, the receiver functions can't be tested.
This commit is contained in:
@@ -12,7 +12,7 @@ func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
|
||||
return Backend().Setup(conf)
|
||||
}
|
||||
|
||||
func Backend() *framework.Backend {
|
||||
func Backend() *backend {
|
||||
var b backend
|
||||
b.Map = &framework.PolicyMap{
|
||||
PathMap: framework.PathMap{
|
||||
@@ -37,7 +37,7 @@ func Backend() *framework.Backend {
|
||||
AuthRenew: b.pathLoginRenew,
|
||||
}
|
||||
|
||||
return b.Backend
|
||||
return &b
|
||||
}
|
||||
|
||||
type backend struct {
|
||||
|
||||
Reference in New Issue
Block a user