mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-06-07 02:43:05 +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
|
// Whitelist adds the given fingerprint to the whitelist
|
||||||
func (s *Server) Whitelist(fingerprint string) error {
|
func (s *Server) Whitelist(fingerprint string) error {
|
||||||
if strings.HasPrefix(fingerprint, "github.com/") {
|
if strings.HasPrefix(fingerprint, "github.com/") {
|
||||||
return s.whitelistIdentityUrl(fingerprint)
|
return s.whitelistIdentityURL(fingerprint)
|
||||||
} else {
|
|
||||||
return s.whitelistFingerprint(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)
|
logger.Infof("Adding github account %s to whitelist", user)
|
||||||
|
|
||||||
user = strings.Replace(user, "github.com/", "", -1)
|
user = strings.Replace(user, "github.com/", "", -1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user