mirror of
https://github.com/moul/sshportal.git
synced 2025-11-12 00:10:34 +08:00
lint fix
This commit is contained in:
parent
32fcfa370c
commit
97bf5d3168
1 changed files with 3 additions and 3 deletions
|
|
@ -13,8 +13,8 @@ import (
|
||||||
"moul.io/sshportal/pkg/dbmodels"
|
"moul.io/sshportal/pkg/dbmodels"
|
||||||
)
|
)
|
||||||
|
|
||||||
// AclHookTimeout is timeout for external ACL hook execution
|
// ACLHookTimeout is timeout for external ACL hook execution
|
||||||
const AclHookTimeout = 2 * time.Second
|
const ACLHookTimeout = 2 * time.Second
|
||||||
|
|
||||||
type byWeight []*dbmodels.ACL
|
type byWeight []*dbmodels.ACL
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ func checkACLsHook(aclCheckCmd string, action string, user dbmodels.User, host d
|
||||||
return action, nil
|
return action, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx, cancel := context.WithTimeout(context.Background(), AclHookTimeout)
|
ctx, cancel := context.WithTimeout(context.Background(), ACLHookTimeout)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
jsonUser, err := json.Marshal(user)
|
jsonUser, err := json.Marshal(user)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue