* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod
* remove pegomock generate m option, which is not support after v4
* make regen-mocks
* replace pegomock v4 primitive eq/matchers
* convert pegomock v4 Eq/Any matchers
* remove custom models.Repo matcher
* pegomock v4 cannot use result method args
ref https://github.com/petergtz/pegomock/issues/123
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* disable pegomock --use-experimental-model-gen, cause random fail by segv
* make regen-mocks
* fix mock code which uses non experimental pegomock codes
* Moved CommandContext and CommandResult to models (#193)
* Moved CommandContext and CommandResult to models
* move from models to command
rename CommandContext -> Context
rename CommandResult -> Result
* moved command related helpers into command package
* move ProjectCommandContext and ProjectResult to command/project package
* move project command context and project result
* revert unrelated code
* move tests
* fix left over
* fix linting
* fix tests
* remove unused import
* fix project context dependencies
* fix depenedecies
* fix typo
* Update go-generate to run as a script
It was taking forever to run via the previous Makefile command. I don't
exactly know why. Perhaps because it was passing all the packages in as
multiple arguments?
Either way, this change allows it to actually run through in about 20
minutes.
* Regenerate all mocks using latest pegomock
Pegomock version v2.9.0
* Format mocks outside of regular mocks directory.
These mocks are outside of the regular directory due to an import cycle
causing us to have to have these not under a /mocks directory so they
need to be formatted since they're not excluded.
* Add back make test target
This is two changes:
Replacing all usages of SimpleLogger with it's interface SimpleLogging which makes it easier to swap out loggers going forward
Nukes SimpleLogger in favor of StructuredLogger which allows us to better analyze logs in our log management system we choose.
- Use logger for all warnings. Previously we were writing warnings from
cmd/server.go directly to stderr which bypassed our normal log format.
- Add the timezone to log output. This is just really nice to have if
you're looking at old logs.
- Change levels to all be 4 characters: DBUG, INFO, WARN, EROR. This
makes the logs easier to read because it lines up.
- Log when we first receive the request as well as when we send a
response. This makes it easier to see where the request starts and ends.
Add Apache 2 license and Hootsuite copyright to all golang
files. Add a disclaimer that the files have been modified
hereafter by contributors to this repo in order to abide
by the Apache 2 license requirements.