mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
33797b120e
commit
b57661a097
3 changed files with 4 additions and 8 deletions
6
Makefile
6
Makefile
|
@ -3,7 +3,7 @@ PACKAGES=core firewall log modules network packets session tls
|
||||||
|
|
||||||
all: deps build
|
all: deps build
|
||||||
|
|
||||||
deps: godep golint gofmt gomegacheck
|
deps: godep golint gofmt
|
||||||
@dep ensure
|
@dep ensure
|
||||||
|
|
||||||
build_with_race_detector: resources
|
build_with_race_detector: resources
|
||||||
|
@ -36,7 +36,6 @@ test: deps
|
||||||
@for pkg in $(PACKAGES); do \
|
@for pkg in $(PACKAGES); do \
|
||||||
go fmt ./$$pkg ; \
|
go fmt ./$$pkg ; \
|
||||||
go vet ./$$pkg ; \
|
go vet ./$$pkg ; \
|
||||||
megacheck ./$$pkg ; \
|
|
||||||
touch $$pkg.profile ; \
|
touch $$pkg.profile ; \
|
||||||
go test -race ./$$pkg -coverprofile=$$pkg.profile -covermode=atomic; \
|
go test -race ./$$pkg -coverprofile=$$pkg.profile -covermode=atomic; \
|
||||||
tail -n +2 $$pkg.profile >> coverage.profile && rm -rf $$pkg.profile ; \
|
tail -n +2 $$pkg.profile >> coverage.profile && rm -rf $$pkg.profile ; \
|
||||||
|
@ -55,8 +54,5 @@ godep:
|
||||||
golint:
|
golint:
|
||||||
@go get -u golang.org/x/lint/golint
|
@go get -u golang.org/x/lint/golint
|
||||||
|
|
||||||
gomegacheck:
|
|
||||||
@go get honnef.co/go/tools/cmd/megacheck
|
|
||||||
|
|
||||||
gofmt:
|
gofmt:
|
||||||
gofmt -s -w $(PACKAGES)
|
gofmt -s -w $(PACKAGES)
|
||||||
|
|
|
@ -142,7 +142,7 @@ func (mod *HIDRecon) doInjection() {
|
||||||
}
|
}
|
||||||
if cmd.Sleep > 0 {
|
if cmd.Sleep > 0 {
|
||||||
mod.Debug("sleeping %dms after command #%d ...", cmd.Sleep, i)
|
mod.Debug("sleeping %dms after command #%d ...", cmd.Sleep, i)
|
||||||
time.Sleep(time.Duration(cmd.Sleep)*time.Millisecond)
|
time.Sleep(time.Duration(cmd.Sleep) * time.Millisecond)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue