Skip to content

Commit d0a7234

Browse files
authored
Fix version check for Graylog 5 and beyond (#445)
How did I miss this? :eyesroll:
1 parent 0f07b9a commit d0a7234

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/version.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ func NewGraylogVersion(v string) (*GraylogVersion, error) {
1616

1717
func (v *GraylogVersion) SupportsMultipleBackends() bool {
1818
// cannot use version.Constraints because of a bug in comparing pre-releases
19-
return v.Version.Segments()[0] >= 4 && v.Version.Segments()[1] >= 4
19+
return (v.Version.Segments()[0] == 4 && v.Version.Segments()[1] >= 4) || v.Version.Segments()[0] >= 5
2020
}
2121

2222
func (v *GraylogVersion) SupportsExtendedNodeDetails() bool {
2323
// cannot use version.Constraints because of a bug in comparing pre-releases
24-
return v.Version.Segments()[0] >= 4 && v.Version.Segments()[1] >= 4
24+
return (v.Version.Segments()[0] == 4 && v.Version.Segments()[1] >= 4) || v.Version.Segments()[0] >= 5
2525
}

0 commit comments

Comments
 (0)