mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-14 16:17:17 +03:00
Fixed issues found by golint.
This commit is contained in:
parent
912175e65a
commit
580ad79a22
@ -268,13 +268,13 @@ func (s *Server) Op(fingerprint string) {
|
||||
// Whitelist adds the given fingerprint to the whitelist
|
||||
func (s *Server) Whitelist(fingerprint string) error {
|
||||
if strings.HasPrefix(fingerprint, "github.com/") {
|
||||
return s.whitelistIdentityUrl(fingerprint)
|
||||
} else {
|
||||
return s.whitelistFingerprint(fingerprint)
|
||||
return s.whitelistIdentityURL(fingerprint)
|
||||
}
|
||||
|
||||
return s.whitelistFingerprint(fingerprint)
|
||||
}
|
||||
|
||||
func (s *Server) whitelistIdentityUrl(user string) error {
|
||||
func (s *Server) whitelistIdentityURL(user string) error {
|
||||
logger.Infof("Adding github account %s to whitelist", user)
|
||||
|
||||
user = strings.Replace(user, "github.com/", "", -1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user