This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
jobs: | |
lint: | |
working_directory: ~/repo | |
docker: | |
- image: golangci/golangci-lint:v1.45 | |
steps: | |
- checkout | |
- run: golangci-lint run ./... --out-format=checkstyle --print-issued-lines=false --print-linter-name=false --issues-exit-code=0 --enable=revive > golanci-report.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
sonar: | |
working_directory: ~/repo | |
docker: | |
- image: circleci/golang:1.17 | |
steps: | |
- checkout | |
- attach_workspace: | |
at: ~/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ===================================================== | |
# Standard properties | |
# ===================================================== | |
sonar.projectKey=YOUR_SONAR_PROJECT_KEY | |
sonar.organization=YOUR_SONAR_ORGANIZATION | |
sonar.projectVersion=1.0 | |
sonar.sources=pkg | |
sonar.exclusions=**/*_test.go,**/vendor/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflows: | |
ci: | |
jobs: | |
- lint | |
- test_and_coverage | |
- build | |
- requires: | |
- lint | |
- test_and_coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
test_and_coverage: | |
working_directory: ~/repo | |
docker: | |
- image: circleci/golang:1.17 | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- go-mod-v4-{{ checksum "go.sum" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workflows: | |
ci: | |
jobs: | |
- lint | |
- build | |
- requires: | |
- lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jobs: | |
lint: | |
working_directory: ~/repo | |
docker: | |
- image: golangci/golangci-lint:v1.45 | |
steps: | |
- checkout | |
- run: golangci-lint run ./... --out-format=checkstyle --print-issued-lines=false --print-linter-name=false --issues-exit-code=0 --enable=revive > golanci-report.xml | |
- persist_to_workspace: | |
root: ~/repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
jobs: | |
build: | |
working_directory: ~/repo | |
docker: | |
- image: circleci/golang:1.17 | |
steps: | |
- checkout | |
- restore_cache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.1 | |
jobs: | |
- job_name | |
workflows: | |
- workflow_name | |
jobs: | |
- job_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routesAdapt = (logger, controllerHandler) => { | |
return async (req, res, next) => { | |
const httpRequest = { | |
body: req.body, | |
headers: req.headers | |
} | |
try { | |
const result = await controllerHandler(httpRequest) | |
logger.error({ method: req.method, path: req.path, statusCode: result.statusCode }) |
NewerOlder