alertmanager
alertmanager copied to clipboard
No way to consume the API v2 client code separately from the main module
This has been reported in https://github.com/prometheus/prometheus/issues/5813.
TL;DR: if project X wants to consume github.com/prometheus/alertmanager/api/v2/client, it needs to depend on the github.com/prometheus/alertmanager module which pull dependencies that aren't really needed and can conflict with the own requirement constraints of project X.
One solution would be to create a distinct module for the (generated) API v2 code (see https://github.com/golang/go/wiki/Modules#faqs--multi-module-repositories).