Skip to content

Commit 6b9f794

Browse files
committed
init
0 parents  commit 6b9f794

File tree

7 files changed

+511
-0
lines changed

7 files changed

+511
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
*
2+
3+
!*.go
4+
!/.gitignore
5+
!/.golangci.yml
6+
!/go.mod
7+
!/go.sum
8+
!/LICENSE
9+
!/Makefile
10+
!/README.md
11+
12+
!*/

.golangci.yml

Lines changed: 363 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,363 @@
1+
issues:
2+
exclude-use-default: false
3+
fix: true
4+
max-issues-per-linter: 0
5+
max-same-issues: 0
6+
7+
linters-settings:
8+
depguard:
9+
rules:
10+
internal:
11+
allow:
12+
# GOROOT.
13+
- encoding/json
14+
- errors
15+
- io
16+
- net/http
17+
- strings
18+
main:
19+
deny:
20+
# Error.
21+
- pkg: github.com/pkg/errors
22+
desc: Instead, use "errors"
23+
24+
# Logging.
25+
- pkg: github.com/sirupsen/logrus
26+
desc: Instead, use "github.com/rs/zerolog"
27+
- pkg: go.uber.org/zap
28+
desc: Instead, use "github.com/rs/zerolog"
29+
- pkg: log
30+
desc: Instead, use "github.com/rs/zerolog"
31+
32+
# Protocol Buffers.
33+
- pkg: github.com/golang/protobuf
34+
desc: Instead, use "google.golang.org/protobuf"
35+
36+
# UUID.
37+
- pkg: github.com/gofrs/uuid
38+
desc: Instead, use "github.com/google/uuid"
39+
- pkg: github.com/satori/go.uuid
40+
desc: Instead, use "github.com/google/uuid"
41+
42+
dupl:
43+
threshold: 100
44+
45+
errcheck:
46+
check-blank: true
47+
check-type-assertions: true
48+
disable-default-exclusions: true
49+
exclude-functions:
50+
- encoding/json.Marshal
51+
- encoding/json.MarshalIndent
52+
53+
errchkjson:
54+
check-error-free-encoding: true
55+
56+
exhaustive:
57+
check:
58+
- map
59+
- switch
60+
check-generated: true
61+
62+
exhaustruct:
63+
exclude:
64+
# GOROOT.
65+
- 'crypto/tls\.Config'
66+
- 'net/http\.Server'
67+
68+
# Third-party.
69+
- 'github\.com/rs/zerolog\.ConsoleWriter'
70+
71+
forbidigo:
72+
analyze-types: true
73+
forbid:
74+
- ^((==|!=) "")$
75+
- ^(fmt\\.Print(|f|ln)|goto|print(|ln))$
76+
- ^(http\\.Default(Client|Transport))$
77+
- ^(time\\.Sleep)$
78+
79+
funlen:
80+
ignore-comments: true
81+
lines: 60
82+
statements: 40
83+
84+
gci:
85+
sections:
86+
- standard
87+
- default
88+
- prefix(entrlcom.dev/)
89+
- blank
90+
- dot
91+
92+
gocognit:
93+
min-complexity: 10
94+
95+
goconst:
96+
ignore-calls: true
97+
max: 0
98+
min: 0
99+
min-len: 2
100+
min-occurrences: 2
101+
102+
gocritic:
103+
disabled-checks:
104+
- emptyStringTest
105+
- ruleguard
106+
- sloppyReassign
107+
enabled-tags:
108+
- diagnostic
109+
- experimental
110+
- opinionated
111+
- performance
112+
# - security
113+
- style
114+
settings:
115+
captLocal:
116+
paramsOnly: true
117+
commentedOutCode:
118+
minLength: 15
119+
elseif:
120+
skipBalanced: true
121+
hugeParam:
122+
sizeThreshold: 256
123+
ifElseChain:
124+
minThreshold: 2
125+
nestingReduce:
126+
bodyWidth: 2
127+
rangeExprCopy:
128+
sizeThreshold: 512
129+
skipTestFuncs: false
130+
rangeValCopy:
131+
sizeThreshold: 128
132+
skipTestFuncs: false
133+
tooManyResultsChecker:
134+
maxResults: 2
135+
truncateCmp:
136+
skipArchDependent: false
137+
underef:
138+
skipRecvDeref: false
139+
unnamedResult:
140+
checkExported: true
141+
142+
godot:
143+
capital: false
144+
period: true
145+
scope: all
146+
147+
godox:
148+
keywords:
149+
- BUG
150+
- FIXME
151+
- HACK
152+
- OPTIMIZE
153+
- TODO
154+
155+
gofumpt:
156+
extra-rules: true
157+
module-path: entrlcom.dev/http-server
158+
159+
gosimple:
160+
checks:
161+
- all
162+
163+
grouper:
164+
import-require-grouping: true
165+
166+
govet:
167+
enable-all: true
168+
169+
misspell:
170+
locale: US
171+
172+
musttag:
173+
functions: [ ]
174+
175+
nakedret:
176+
max-func-lines: 0
177+
178+
nestif:
179+
min-complexity: 3
180+
181+
nilnil:
182+
checked-types:
183+
- chan
184+
- func
185+
- iface
186+
- map
187+
- ptr
188+
189+
nolintlint:
190+
require-explanation: true
191+
require-specific: true
192+
193+
prealloc:
194+
for-loops: true
195+
196+
rowserrcheck:
197+
packages:
198+
- github.com/jmoiron/sqlx
199+
200+
staticcheck:
201+
checks:
202+
- all
203+
204+
stylecheck:
205+
checks:
206+
- all
207+
- -ST1000
208+
- -ST1003
209+
210+
tagalign:
211+
strict: true
212+
213+
tagliatelle:
214+
case:
215+
rules:
216+
bson: snake
217+
env: upperSnake
218+
json: snake
219+
220+
usestdlibvars:
221+
constant-kind: true
222+
crypto-hash: true
223+
default-rpc-path: true
224+
sql-isolation-level: true
225+
time-layout: true
226+
time-month: true
227+
tls-signature-scheme: true
228+
229+
wsl:
230+
allow-assign-and-anything: false
231+
allow-assign-and-call: true
232+
allow-cuddle-declarations: false
233+
allow-cuddle-with-calls:
234+
- Lock
235+
- RLock
236+
allow-cuddle-with-rhs:
237+
- RUnlock
238+
- Unlock
239+
allow-multiline-assign: true
240+
allow-separated-leading-comment: false
241+
allow-trailing-comment: false
242+
error-variable-names:
243+
- err
244+
force-case-trailing-whitespace: 0
245+
force-err-cuddling: false
246+
force-short-decl-cuddling: false
247+
strict-append: true
248+
249+
linters:
250+
disable:
251+
- dupword
252+
- ginkgolinter
253+
- gocyclo
254+
- gofmt
255+
- goheader
256+
- goimports # gci
257+
- gomodguard
258+
- gosmopolitan
259+
- ireturn
260+
- loggercheck
261+
- maintidx
262+
- nonamedreturns
263+
- reassign
264+
- revive # TODO: Set linter.
265+
- varnamelen
266+
- wrapcheck
267+
enable:
268+
- asasalint
269+
- asciicheck
270+
- bidichk
271+
- bodyclose
272+
- containedctx
273+
- contextcheck
274+
- cyclop
275+
- decorder
276+
- depguard
277+
- dogsled
278+
- dupl
279+
- durationcheck
280+
- errcheck
281+
- errchkjson
282+
- errname
283+
- errorlint
284+
- execinquery
285+
- exhaustive
286+
- exhaustruct
287+
- exportloopref
288+
- forcetypeassert
289+
- funlen
290+
- gci
291+
- gocheckcompilerdirectives
292+
- gochecknoglobals
293+
- gochecknoinits
294+
- gocognit
295+
- goconst
296+
- godot
297+
- godox
298+
- goerr113
299+
- gofumpt
300+
- gomnd
301+
- gomoddirectives
302+
- goprintffuncname
303+
- gosec
304+
- gosimple
305+
- grouper
306+
- govet
307+
- importas
308+
- ineffassign
309+
- interfacebloat
310+
- lll
311+
- makezero
312+
- mirror
313+
- misspell
314+
- musttag
315+
- nakedret
316+
- nestif
317+
- nilerr
318+
- nilnil
319+
- nlreturn
320+
- noctx
321+
- nolintlint
322+
- nosprintfhostport
323+
- paralleltest
324+
- prealloc
325+
- predeclared
326+
- promlinter
327+
- rowserrcheck
328+
- sqlclosecheck
329+
- staticcheck
330+
- stylecheck
331+
- tagalign
332+
- tagliatelle
333+
- tenv
334+
- testableexamples
335+
- testpackage
336+
- thelper
337+
- tparallel
338+
- unconvert
339+
- unparam
340+
- usestdlibvars
341+
- wastedassign
342+
- whitespace
343+
- wsl
344+
presets:
345+
- bugs
346+
- comment
347+
- complexity
348+
- error
349+
- format
350+
- import
351+
- metalinter
352+
- module
353+
- performance
354+
- sql
355+
- style
356+
- test
357+
- unused
358+
359+
output:
360+
sort-results: true
361+
362+
run:
363+
modules-download-mode: readonly

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 ENTRLCOM LIMITED
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)