mirror of
https://github.com/bakito/adguardhome-sync.git
synced 2025-01-10 09:09:46 +08:00
26 lines
769 B
Go
26 lines
769 B
Go
|
package versions
|
||
|
|
||
|
import "golang.org/x/mod/semver"
|
||
|
|
||
|
const (
|
||
|
// MinAgh minimal adguardhome version
|
||
|
MinAgh = "v0.107.0"
|
||
|
// LastStringCustomRules last adguardhome version with string payload custom rules
|
||
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
||
|
LastStringCustomRules = "v0.107.13"
|
||
|
// IncompatibleAPI adguardhome version with incompatible API
|
||
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
||
|
IncompatibleAPI = "v0.107.14"
|
||
|
// FixedIncompatibleAPI adguardhome version with fixed API
|
||
|
// https://github.com/bakito/adguardhome-sync/issues/99
|
||
|
FixedIncompatibleAPI = "v0.107.15"
|
||
|
)
|
||
|
|
||
|
func IsNewerThan(v1 string, v2 string) bool {
|
||
|
return semver.Compare(v1, v2) == 1
|
||
|
}
|
||
|
|
||
|
func IsSame(v1 string, v2 string) bool {
|
||
|
return semver.Compare(v1, v2) == 0
|
||
|
}
|