mirror of
https://github.com/aykhans/dodo.git
synced 2025-04-21 11:16:47 +00:00
Compare commits
10 Commits
ca74092615
...
00afca7139
Author | SHA1 | Date | |
---|---|---|---|
00afca7139 | |||
1589fefeb8 | |||
bbc43bbaac | |||
89fcf5f174 | |||
a58f734a55 | |||
efd5176ab9 | |||
f0adcaf328 | |||
6314cf7724 | |||
140e570b85 | |||
83c5788e54 |
@ -4,6 +4,7 @@ binaries
|
|||||||
dodo
|
dodo
|
||||||
.git
|
.git
|
||||||
.gitignore
|
.gitignore
|
||||||
|
.golangci.yml
|
||||||
README.md
|
README.md
|
||||||
LICENSE
|
LICENSE
|
||||||
config.json
|
config.json
|
||||||
|
25
.github/workflows/golangci-lint.yml
vendored
Normal file
25
.github/workflows/golangci-lint.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: golangci-lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
golangci:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: stable
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v6
|
||||||
|
with:
|
||||||
|
version: v1.64
|
||||||
|
args: --timeout=10m --config=.golangci.yml
|
27
.golangci.yml
Normal file
27
.golangci.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
run:
|
||||||
|
go: "1.23"
|
||||||
|
concurrency: 8
|
||||||
|
timeout: 10m
|
||||||
|
|
||||||
|
linters:
|
||||||
|
disable-all: true
|
||||||
|
enable:
|
||||||
|
- asasalint
|
||||||
|
- asciicheck
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
- gomodguard
|
||||||
|
- goprintffuncname
|
||||||
|
- govet
|
||||||
|
- ineffassign
|
||||||
|
- misspell
|
||||||
|
- nakedret
|
||||||
|
- nolintlint
|
||||||
|
- prealloc
|
||||||
|
- prealloc
|
||||||
|
- reassign
|
||||||
|
- staticcheck
|
||||||
|
- typecheck
|
||||||
|
- unconvert
|
||||||
|
- unused
|
||||||
|
- whitespace
|
9
Makefile
Normal file
9
Makefile
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
lint:
|
||||||
|
golangci-lint run
|
||||||
|
|
||||||
|
build:
|
||||||
|
go build -ldflags "-s -w" -o "./dodo"
|
||||||
|
|
||||||
|
build-all:
|
||||||
|
rm -rf ./binaries
|
||||||
|
./build.sh
|
@ -98,7 +98,7 @@ func (config *RequestConfig) GetValidDodosCountForProxies() uint {
|
|||||||
|
|
||||||
func (config *RequestConfig) GetMaxConns(minConns uint) uint {
|
func (config *RequestConfig) GetMaxConns(minConns uint) uint {
|
||||||
maxConns := max(
|
maxConns := max(
|
||||||
minConns, uint(config.GetValidDodosCountForRequests()),
|
minConns, config.GetValidDodosCountForRequests(),
|
||||||
)
|
)
|
||||||
return ((maxConns * 50 / 100) + maxConns)
|
return ((maxConns * 50 / 100) + maxConns)
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ func releaseDodos(
|
|||||||
requestCountPerDodo uint
|
requestCountPerDodo uint
|
||||||
dodosCount uint = requestConfig.GetValidDodosCountForRequests()
|
dodosCount uint = requestConfig.GetValidDodosCountForRequests()
|
||||||
dodosCountInt int = int(dodosCount)
|
dodosCountInt int = int(dodosCount)
|
||||||
requestCount uint = uint(requestConfig.RequestCount)
|
requestCount uint = requestConfig.RequestCount
|
||||||
responses = make([][]*Response, dodosCount)
|
responses = make([][]*Response, dodosCount)
|
||||||
increase = make(chan int64, requestCount)
|
increase = make(chan int64, requestCount)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user