- Git Branching Arch
- git log --pretty --oneline --graph
- Try Git Visually Tutorial
- git config --global core.editor "code --wait"/'vi'
- My Git Notes
- MYSQL Links:
- MySQL Privilages
- PackageSQL
- QueryRowContext
- Query
- SQL Mock
- Example Orders for Mock
- Truncate a table referenced by a foreign key
- [Command to create schema from schema.sql on local system]: mysql -u root -p HiringTest < /Users/ishanpandey/Desktop/hiring-portal-api/panel/db/table.sql
- Gorilla Mux:
- Mux Doc
- Example: r.HandleFunc("/products", ProductsHandler). Host("www.example.com"). Methods("GET"). Schemes("http")
- Mux Examples
- Mux SetURLVars
- golangci-lint:
- Install
- Set up your own linters: Sample golangci-lint file
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 10
gocognit:
min-complexity: 10
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: gitlab.kroger.com/krogo
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- wrapperFunc
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
funlen:
lines: 100
statements: 50
linters:
# please, do not use `enable-all`: it's deprecated and will be removed soon.
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
disable-all: true
enable:
- asciicheck
- bodyclose
- deadcode
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godox
- gofmt
- goimports
- golint
- gomnd
- gosec
- gosimple
- govet
- ineffassign
- lll
- maligned
- misspell
- nakedret
- nolintlint
- prealloc
- rowserrcheck
- scopelint
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
- wsl
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.28.x # use the fixed version to not introduce new linters unexpectedly
prepare:
- echo "here I can run custom commands, but no preparation needed for this repo"
- PostMan Tests:
- Handling Errors:
- Coverage Reports: