package-analysis
package-analysis copied to clipboard
Refactor package resolution logic out of cmd/{worker,analysis}/main.go
Refactors duplicate logic from cmd/{worker,analysis}/main.go, with slight behaviour changes:
- The analysis version panicked if both a local package and an explicit version were specified on the command line. According to @calebbrown this behaviour is not necessary and can be removed
- If
manager.Latestreturns a non-nil error, the log message changes fromFailed to get latest versiontoError resolving packageand the log tags contain a key"error": "failed to get latest version for package <package name>: <returned error info>"
Are these acceptable?