mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 07:37:17 +03:00
Merge pull request #131 from fjarlq/master
Clarify README.md; fix `go vet` nitpicks; fix `make deps` for CI tests; fix `make build`
This commit is contained in:
commit
bebee0fada
4
Makefile
4
Makefile
@ -6,11 +6,11 @@ SRCS = %.go
|
||||
|
||||
all: $(BINARY)
|
||||
|
||||
$(BINARY): **/**/*.go **/*.go *.go
|
||||
$(BINARY): deps **/**/*.go **/*.go *.go
|
||||
go build -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat
|
||||
|
||||
deps:
|
||||
go get .
|
||||
go get ./...
|
||||
|
||||
build: $(BINARY)
|
||||
|
||||
|
@ -49,7 +49,7 @@ Help Options:
|
||||
-h, --help Show this help message
|
||||
```
|
||||
|
||||
After doing `go get github.com/shazow/ssh-chat` on this repo, you should be able
|
||||
After doing `go get github.com/shazow/ssh-chat/...` on this repo, you should be able
|
||||
to run a command like:
|
||||
|
||||
```
|
||||
|
2
auth.go
2
auth.go
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user