Skip to content

Commit ca674ad

Browse files
committed
feat: added versioner impl
Signed-off-by: Sahil Silare <[email protected]>
1 parent 29f2ea4 commit ca674ad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/detectors/brandfetch/v1/brandfetch.go

+3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ import (
1414

1515
type Scanner struct{}
1616

17+
func (s Scanner) Version() int { return 1 }
18+
1719
// Ensure the Scanner satisfies the interface at compile time.
1820
var _ detectors.Detector = (*Scanner)(nil)
21+
var _ detectors.Versioner = (*Scanner)(nil)
1922
var (
2023
client = common.SaneHttpClient()
2124

pkg/detectors/brandfetch/v2/brandfetch.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import (
1414

1515
type Scanner struct{}
1616

17+
func (s Scanner) Version() int { return 2 }
18+
1719
// Ensure the Scanner satisfies the interface at compile time.
1820
var _ detectors.Detector = (*Scanner)(nil)
19-
21+
var _ detectors.Versioner = (*Scanner)(nil)
2022
var (
2123
client = common.SaneHttpClient()
2224

0 commit comments

Comments
 (0)