This repository consisted of APIs used in gotify plugins.
https://gotify.net/docs/plugin
Since go.mod
follows a minimal version selection, packages are built with the lowest common version requirement defined in go.mod
. This poses a problem when developing plugins:
If the gotify server is built with the following go.mod:
require some/package v0.1.0
But when the plugin is built, it used a newer version of this package:
require some/package v0.1.1
Since the server is built with v0.1.0
and the plugin is built with v0.1.1
of some/package
, the built plugin could not be loaded due to different import package versions.
gomod-cap
is a simple util to ensure that plugin go.mod
files does not have higher version requirements than the main gotify go.mod
file.
To resolve all incompatible requirements:
$ go run github.com/gotify/plugin-api/cmd/gomod-cap -from /path/to/gotify/server/go.mod -to /path/to/plugin/go.mod
To only check for incompatible requirements(useful in CI):
$ go run github.com/gotify/plugin-api/cmd/gomod-cap -from /path/to/gotify/server/go.mod -to /path/to/plugin/go.mod -check=true