Skip to content

Commit

Permalink
v3.0 release!
Browse files Browse the repository at this point in the history
  • Loading branch information
OJ committed Jun 19, 2019
2 parents 0e209e5 + 39bd531 commit c008548
Show file tree
Hide file tree
Showing 39 changed files with 2,497 additions and 879 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,7 @@ _testmain.go
*.txt
*.swp

.vscode/
gobuster
build
v3
29 changes: 29 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
linters:
enable-all: true
disable:
- lll
- gocyclo

issues:
exclude-rules:
- text: "TLS InsecureSkipVerify may be true"
linters:
- gosec

- text: ifElseChain
linters:
- gocritic

- path: cli\\cmd\\.+\.go
linters:
- gochecknoinits
- gochecknoglobals

- path: cli/cmd/.+\.go
linters:
- gochecknoinits
- gochecknoglobals

- path: _test\.go
linters:
- scopelint
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ go:
- "1.x"
- "1.8"
- "1.10.x"
- "1.11.x"
- "1.12.x"
- master

script: make test
script: make lint test
28 changes: 22 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
TARGET=./build
ARCHS=amd64 386
LDFLAGS="-s -w"
GCFLAGS="all=-trimpath=${GOPATH}/src"
ASMFLAGS="all=-trimpath=${GOPATH}/src"
GCFLAGS="all=-trimpath=$(shell pwd)"
ASMFLAGS="all=-trimpath=$(shell pwd)"

current:
@go build -o ./gobuster; \
echo "Done."

fmt:
@go fmt ./...; \
echo "Done."

update:
@go get -u; \
go mod tidy -v; \
echo "Done."

windows:
@for GOARCH in ${ARCHS}; do \
echo "Building for windows $${GOARCH} ..." ; \
mkdir -p ${TARGET}/gobuster-windows-$${GOARCH} ; \
GOOS=windows GOARCH=$${GOARCH} go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-windows-$${GOARCH}/gobuster.exe ; \
GOOS=windows GOARCH=$${GOARCH} GO111MODULE=on go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-windows-$${GOARCH}/gobuster.exe ; \
done; \
echo "Done."

linux:
@for GOARCH in ${ARCHS}; do \
echo "Building for linux $${GOARCH} ..." ; \
mkdir -p ${TARGET}/gobuster-linux-$${GOARCH} ; \
GOOS=linux GOARCH=$${GOARCH} go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-linux-$${GOARCH}/gobuster ; \
GOOS=linux GOARCH=$${GOARCH} GO111MODULE=on go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-linux-$${GOARCH}/gobuster ; \
done; \
echo "Done."

darwin:
@for GOARCH in ${ARCHS}; do \
echo "Building for darwin $${GOARCH} ..." ; \
mkdir -p ${TARGET}/gobuster-darwin-$${GOARCH} ; \
GOOS=darwin GOARCH=$${GOARCH} go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-darwin-$${GOARCH}/gobuster ; \
GOOS=darwin GOARCH=$${GOARCH} GO111MODULE=on go build -ldflags=${LDFLAGS} -gcflags=${GCFLAGS} -asmflags=${ASMFLAGS} -o ${TARGET}/gobuster-darwin-$${GOARCH}/gobuster ; \
done; \
echo "Done."

all: darwin linux windows
all: clean fmt update lint test darwin linux windows

test:
@go test -v -race ./... ; \
echo "Done."

lint:
@go get -u github.com/golangci/golangci-lint@master ; \
golangci-lint run ./... ; \
go mod tidy ; \
echo Done

clean:
@rm -rf ${TARGET}/* ; \
go clean ./... ; \
echo "Done."
Loading

0 comments on commit c008548

Please sign in to comment.