Skip to content

Commit 993233b

Browse files
authored
Merge pull request #94 from essentialkaos/develop
Version 13.1.2
2 parents dbe1b25 + 9ec6b65 commit 993233b

File tree

6 files changed

+124
-92
lines changed

6 files changed

+124
-92
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ on:
88
schedule:
99
- cron: '0 13 */15 * *'
1010

11+
permissions:
12+
actions: read
13+
contents: read
14+
statuses: write
15+
16+
env:
17+
SRC_DIR: src/github.com/${{ github.repository }}
18+
1119
jobs:
1220
Go:
1321
name: Go
1422
runs-on: ubuntu-latest
1523

16-
env:
17-
SRC_DIR: src/github.com/${{ github.repository }}
18-
GO111MODULE: auto
19-
2024
strategy:
2125
matrix:
2226
go: [ '1.17.x', '1.18.x' ]
@@ -26,13 +30,6 @@ jobs:
2630
uses: actions/setup-go@v3
2731
with:
2832
go-version: ${{ matrix.go }}
29-
id: go
30-
31-
- name: Setup PATH
32-
run: |
33-
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
34-
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
35-
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
3633

3734
- name: Checkout
3835
uses: actions/checkout@v3
@@ -41,7 +38,7 @@ jobs:
4138

4239
- name: Download dependencies
4340
working-directory: ${{env.SRC_DIR}}
44-
run: make deps deps-test
41+
run: make deps
4542

4643
- name: Run tests
4744
working-directory: ${{env.SRC_DIR}}
@@ -53,22 +50,11 @@ jobs:
5350

5451
needs: Go
5552

56-
env:
57-
SRC_DIR: src/github.com/${{ github.repository }}
58-
GO111MODULE: auto
59-
6053
steps:
6154
- name: Set up Go
6255
uses: actions/setup-go@v3
6356
with:
6457
go-version: '1.17.x'
65-
id: go
66-
67-
- name: Setup PATH
68-
run: |
69-
echo "GOPATH=${{ github.workspace }}" >> "$GITHUB_ENV"
70-
echo "GOBIN=${{ github.workspace }}/bin" >> "$GITHUB_ENV"
71-
echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
7258

7359
- name: Checkout
7460
uses: actions/checkout@v3

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525
fetch-depth: 2
2626

2727
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@v1
28+
uses: github/codeql-action/init@v2
2929
with:
3030
languages: go
3131

3232
- name: Perform CodeQL Analysis
33-
uses: github/codeql-action/analyze@v1
33+
uses: github/codeql-action/analyze@v2

Makefile

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
################################################################################
22

3-
# This Makefile generated by GoMakeGen 1.5.1 using next command:
3+
# This Makefile generated by GoMakeGen 2.1.0 using next command:
44
# gomakegen --mod .
55
#
66
# More info: https://kaos.sh/gomakegen
@@ -9,39 +9,84 @@
99

1010
export GO111MODULE=on
1111

12+
ifdef VERBOSE ## Print verbose information (Flag)
13+
VERBOSE_FLAG = -v
14+
endif
15+
16+
MAKEDIR = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
17+
GITREV ?= $(shell test -s $(MAKEDIR)/.git && git rev-parse --short HEAD)
18+
19+
################################################################################
20+
1221
.DEFAULT_GOAL := help
13-
.PHONY = fmt vet deps deps-test test mod-init mod-update mod-vendor help
22+
.PHONY = fmt vet deps update test init vendor mod-init mod-update mod-download mod-vendor help
1423

1524
################################################################################
1625

17-
deps: mod-update ## Download dependencies
26+
init: mod-init ## Initialize new module
27+
28+
deps: mod-download ## Download dependencies
1829

19-
deps-test: deps ## Download dependencies for tests
30+
update: mod-update ## Update dependencies to the latest versions
31+
32+
vendor: mod-vendor ## Make vendored copy of dependencies
2033

2134
test: ## Run tests
22-
go test -covermode=count .
35+
ifdef COVERAGE_FILE ## Save coverage data into file (String)
36+
go test $(VERBOSE_FLAG) -covermode=count -coverprofile=$(COVERAGE_FILE) .
37+
else
38+
go test $(VERBOSE_FLAG) -covermode=count .
39+
endif
2340

24-
mod-init: ## Initialize new module
41+
mod-init:
42+
ifdef MODULE_PATH ## Module path for initialization (String)
43+
go mod init $(MODULE_PATH)
44+
else
2545
go mod init
26-
go mod tidy
46+
endif
47+
48+
ifdef COMPAT ## Compatible Go version (String)
49+
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
50+
else
51+
go mod tidy $(VERBOSE_FLAG)
52+
endif
53+
54+
mod-update:
55+
ifdef UPDATE_ALL ## Update all dependencies (Flag)
56+
go get -u $(VERBOSE_FLAG) all
57+
else
58+
go get -u $(VERBOSE_FLAG) ./...
59+
endif
60+
61+
ifdef COMPAT
62+
go mod tidy $(VERBOSE_FLAG) -compat=$(COMPAT)
63+
else
64+
go mod tidy $(VERBOSE_FLAG)
65+
endif
66+
67+
test -d vendor && rm -rf vendor && go mod vendor $(VERBOSE_FLAG) || :
2768

28-
mod-update: ## Download modules to local cache
69+
mod-download:
2970
go mod download
3071

31-
mod-vendor: ## Make vendored copy of dependencies
32-
go mod vendor
72+
mod-vendor:
73+
rm -rf vendor && go mod vendor $(VERBOSE_FLAG)
3374

3475
fmt: ## Format source code with gofmt
3576
find . -name "*.go" -exec gofmt -s -w {} \;
3677

37-
vet: ## Runs go vet over sources
78+
vet: ## Runs 'go vet' over sources
3879
go vet -composites=false -printfuncs=LPrintf,TLPrintf,TPrintf,log.Debug,log.Info,log.Warn,log.Error,log.Critical,log.Print ./...
3980

4081
help: ## Show this info
41-
@echo -e '\n\033[1mSupported targets:\033[0m\n'
82+
@echo -e '\n\033[1mTargets:\033[0m\n'
4283
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
43-
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-12s\033[0m %s\n", $$1, $$2}'
84+
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[33m%-14s\033[0m %s\n", $$1, $$2}'
85+
@echo -e '\n\033[1mVariables:\033[0m\n'
86+
@grep -E '^ifdef [A-Z_]+ .*?## .*$$' $(abspath $(lastword $(MAKEFILE_LIST))) \
87+
| sed 's/ifdef //' \
88+
| awk 'BEGIN {FS = " .*?## "}; {printf " \033[32m%-14s\033[0m %s\n", $$1, $$2}'
4489
@echo -e ''
45-
@echo -e '\033[90mGenerated by GoMakeGen 1.5.1\033[0m\n'
90+
@echo -e '\033[90mGenerated by GoMakeGen 2.1.0\033[0m\n'
4691

4792
################################################################################

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module github.com/essentialkaos/sslscan/v13
33
go 1.17
44

55
require (
6-
github.com/essentialkaos/check v1.2.1
7-
github.com/valyala/fasthttp v1.35.0
6+
github.com/essentialkaos/check v1.3.0
7+
github.com/valyala/fasthttp v1.38.0
88
)
99

1010
require (
1111
github.com/andybalholm/brotli v1.0.4 // indirect
12-
github.com/klauspost/compress v1.15.0 // indirect
12+
github.com/klauspost/compress v1.15.8 // indirect
1313
github.com/kr/pretty v0.3.0 // indirect
1414
github.com/kr/text v0.2.0 // indirect
1515
github.com/rogpeppe/go-internal v1.6.1 // indirect

go.sum

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY=
22
github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
33
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
4-
github.com/essentialkaos/check v1.2.1 h1:avvyFy/1acUNwfxwuOLsHeCjfXtMygtbu0lVDr3nxFs=
5-
github.com/essentialkaos/check v1.2.1/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
6-
github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U=
4+
github.com/essentialkaos/check v1.3.0 h1:ria+8o22RCLdt2D/1SHQsEH5Mmy5S+iWHaGHrrbPUc0=
5+
github.com/essentialkaos/check v1.3.0/go.mod h1:PhxzfJWlf5L/skuyhzBLIvjMB5Xu9TIyDIsqpY5MvB8=
76
github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
7+
github.com/klauspost/compress v1.15.8 h1:JahtItbkWjf2jzm/T+qgMxkP9EMHsqEUA6vCMGmXvhA=
8+
github.com/klauspost/compress v1.15.8/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
89
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
910
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
1011
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
@@ -16,8 +17,8 @@ github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBO
1617
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
1718
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
1819
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
19-
github.com/valyala/fasthttp v1.35.0 h1:wwkR8mZn2NbigFsaw2Zj5r+xkmzjbrA/lyTmiSlal/Y=
20-
github.com/valyala/fasthttp v1.35.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
20+
github.com/valyala/fasthttp v1.38.0 h1:yTjSSNjuDi2PPvXY2836bIwLmiTS2T4T9p1coQshpco=
21+
github.com/valyala/fasthttp v1.38.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I=
2122
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
2223
golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
2324
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=

0 commit comments

Comments
 (0)