All Training Articles:

  1. Git Config
  1. MYSQL Links:
  1. Gorilla Mux:
  1. 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"
  1. PostMan Tests:
  1. Handling Errors:
  1. Coverage Reports: