Age | Commit message (Collapse) | Author |
|
fix: propagate context to sub requests
See merge request gitlab-org/gitlab-pages!538
|
|
|
|
|
|
Use file.html explicitly in test
|
|
Change variables of error type to strings constants when these variables
are solely used for the message contained in the errors.
|
|
- ineffassign
- misspell
- structcheck
- typecheck
- unconvert
- unused
- varcheck
- whitespace
|
|
As part of https://gitlab.com/gitlab-org/gitlab-pages/-/issues/385
we have introduced the use of a custom `.golangci.yml` file with some
custom rules for linting.
This replaces the need of downloading and using `golint`, `gofmt`
`go vet` and `gocyclo` manually. We take advantage of the custom
`golangci-lint` docker image as stated in the [Automatic lintinb]
(https://docs.gitlab.com/ee/development/go_guide/#automatic-linting)
section of the Go standards and style guidelines.
This iteration enables a subset of linters, with the remaining
of them enabled on a separate MR as described in the issue above.
The main changes introduced by this linter include:
- gosec: potential hardcoded credentials
- goconst: DRY by declaring and using constants
- gosimple: reduce statements complexity and improve return statements
|
|
increasing MaxIdleConnsPerHost
|
|
|
|
|
|
Remove some duplicate logic on Auth module
Separate handling artifact to own handlers package
Unit test handlers by mocking auth and artifact modules
Add generate-mock step to Makefile
Use additional handler func to simplify TryMakeRequest return type
Always try with token if exists
Do not log RequestURI, log path only
Remove not used logRequest func
|
|
The "assert" form is difficult to use correctly and complicates test
understanding. I think we should insist on using require *only* in
our tests across GitLab.
|
|
|
|
|
|
|
|
|
|
|