mirror of
https://github.com/shazow/ssh-chat.git
synced 2026-10-22 23:52:12 +03:00
Fix go vet nitpicks.
Fixes #130: * pass by reference into AllowAnonymous * check return value of From() rather than value of From function
This commit is contained in:
1 parent
d799863305
commit
0ab31046c0
2 files changed
+2
-2
No files matched your search
@@ -54,7 +54,7 @@ func NewAuth() *Auth {
|
||||
}
|
||||
|
||||
// AllowAnonymous determines if anonymous users are permitted.
|
||||
func (a Auth) AllowAnonymous() bool {
|
||||
func (a *Auth) AllowAnonymous() bool {
|
||||
return a.whitelist.Len() == 0
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ func (c Commands) Alias(command string, alias string) error {
|
||||
|
||||
// Run executes a command message.
|
||||
func (c Commands) Run(room *Room, msg message.CommandMsg) error {
|
||||
if msg.From == nil {
|
||||
if msg.From() == nil {
|
||||
return ErrNoOwner
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user