mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-05-30 07:09:23 +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)
|
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
|
go build -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
go get .
|
go get ./...
|
||||||
|
|
||||||
build: $(BINARY)
|
build: $(BINARY)
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Help Options:
|
|||||||
-h, --help Show this help message
|
-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:
|
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.
|
// AllowAnonymous determines if anonymous users are permitted.
|
||||||
func (a Auth) AllowAnonymous() bool {
|
func (a *Auth) AllowAnonymous() bool {
|
||||||
return a.whitelist.Len() == 0
|
return a.whitelist.Len() == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ func (c Commands) Alias(command string, alias string) error {
|
|||||||
|
|
||||||
// Run executes a command message.
|
// Run executes a command message.
|
||||||
func (c Commands) Run(room *Room, msg message.CommandMsg) error {
|
func (c Commands) Run(room *Room, msg message.CommandMsg) error {
|
||||||
if msg.From == nil {
|
if msg.From() == nil {
|
||||||
return ErrNoOwner
|
return ErrNoOwner
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user