Fixed issues found by golint.

This commit is contained in:
empathetic-alligator 2014-12-16 21:18:10 -05:00
parent 912175e65a
commit 580ad79a22

View File

@ -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)