Resolve "enable more checks from golangci-lint"
Closes #114 (closed)
Changes include:
- automatic fixes by golangci-lint
- added config for golangci-lint in backend/.golangci.yml
- added arg
fix
to lint_go take task that enables fixing - added ignoring cover check for new func prepareTLC
- manual fixes for golangci-lint
- removed all globals
- added CAClient to avoid httpClient11 global, this involves creating NewStorkAgent function, and replaces client.go
- reorganized imports, now they are in the following order (separated by empty line): stdlib imports, 3rd pardy packages, our stork packages
- all acronyms are using capital letters now (eg. URL instead of Url)
- replaces app types from explicit strings like "kea" to consts like KeaAppType
- machineToRestApi func does not return error anymore so error handling has been removed
- split Serve function from restservice.go to reduce its complexity
- reordered return values so error is always last
Edited by Michal Nowikowski