forked from yahoo/gryffin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yahoo#37 from dmitris/stylefix
add go.mod, fix style and linting issues
- Loading branch information
Showing
17 changed files
with
106 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ language: go | |
sudo: false | ||
|
||
go: | ||
- 1.3 | ||
- 1.4 | ||
- 1.5 | ||
- "1.13" | ||
- "1.14.2" | ||
- tip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,34 @@ | ||
|
||
# This Makefile is adopted from https://github.com/hashicorp/consul/blob/master/Makefile | ||
# This Makefile is adopted from https://github.com/hashicorp/consul/blob/master/Makefile | ||
|
||
DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...) | ||
|
||
PACKAGES = $(shell go list ./...) | ||
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \ | ||
-nilfunc -rangeloops -shift -structtags -unsafeptr | ||
#-printf | ||
|
||
all: deps format | ||
all: format build | ||
|
||
cov: | ||
gocov test | gocov-html > /tmp/coverage.html | ||
open /tmp/coverage.html | ||
|
||
deps: | ||
go get -d -v ./... $(DEPS) | ||
|
||
updatedeps: deps | ||
go get -d -f -u ./... $(DEPS) | ||
|
||
build: test | ||
cd cmd/gryffin-standalone; go install | ||
cd cmd/gryffin-standalone; go build | ||
|
||
test: deps | ||
test: | ||
go test ./... | ||
@$(MAKE) vet | ||
|
||
test-mono: | ||
test-mono: | ||
go run cmd/gryffin-standalone/main.go "http://127.0.0.1:8081" | ||
go run cmd/gryffin-standalone/main.go "http://127.0.0.1:8082/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit" | ||
|
||
|
||
test-integration: | ||
INTEGRATION=1 go test ./... | ||
|
||
test-cover: deps | ||
test-cover: | ||
go test --cover ./... | ||
|
||
format: deps | ||
@go fmt $(PACKAGES) | ||
format: | ||
@gofmt -l . | ||
|
||
vet: | ||
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \ | ||
go get golang.org/x/tools/cmd/vet; \ | ||
fi | ||
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \ | ||
echo ""; \ | ||
echo "Vet found suspicious constructs. Please check the reported constructs"; \ | ||
echo "and fix them if necessary before submitting the code for reviewal."; \ | ||
fi | ||
|
||
.PHONY: all cov deps build test vet web web-push | ||
@go vet ./... | ||
|
||
.PHONY: all cov build test vet web web-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module github.com/yahoo/gryffin | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/mfonda/simhash v0.0.0-20151007195837-79f94a1100d6 | ||
github.com/nsqio/go-nsq v1.0.8 | ||
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= | ||
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | ||
github.com/mfonda/simhash v0.0.0-20151007195837-79f94a1100d6 h1:bjfMeqxWEJ6IRUvGkiTkSwx0a6UdQJsbirRSoXogteY= | ||
github.com/mfonda/simhash v0.0.0-20151007195837-79f94a1100d6/go.mod h1:WVJJvUw/pIOcwu2O8ZzHEhmigq2jzwRNfJVRMJB7bR8= | ||
github.com/nsqio/go-nsq v1.0.8 h1:3L2F8tNLlwXXlp2slDUrUWSBn2O3nMh8R1/KEDFTHPk= | ||
github.com/nsqio/go-nsq v1.0.8/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= | ||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | ||
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 h1:Jcxah/M+oLZ/R4/z5RzfPzGbPXnVDPkEDtf2JnuxN+U= | ||
golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= | ||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | ||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= | ||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,4 @@ func (r *NoScriptRenderer) Do(s *gryffin.Scan) { | |
} | ||
|
||
go crawl() | ||
|
||
return | ||
} |
Oops, something went wrong.