File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- //go:build linux
15
+ //go:build !windows
16
16
17
17
// Package rpm extracts packages from rpm database.
18
18
package rpm
@@ -113,7 +113,9 @@ func (e Extractor) Name() string { return Name }
113
113
func (e Extractor ) Version () int { return 0 }
114
114
115
115
// Requirements of the extractor.
116
- func (e Extractor ) Requirements () * plugin.Capabilities { return & plugin.Capabilities {} }
116
+ func (e Extractor ) Requirements () * plugin.Capabilities {
117
+ return & plugin.Capabilities {}
118
+ }
117
119
118
120
// FileRequired returns true if the specified file matches rpm status file pattern.
119
121
func (e Extractor ) FileRequired (api filesystem.FileAPI ) bool {
Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- //go:build !linux
15
+ //go:build windows
16
16
17
17
// Package rpm extracts packages from rpm database.
18
18
package rpm
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import (
21
21
"path"
22
22
"path/filepath"
23
23
"runtime"
24
- "slices"
25
24
"sort"
26
25
"strings"
27
26
"testing"
@@ -44,7 +43,7 @@ import (
44
43
45
44
func TestFileRequired (t * testing.T ) {
46
45
// supported OSes
47
- if ! slices . Contains ([] string { "linux" }, runtime .GOOS ) {
46
+ if runtime .GOOS == "windows" {
48
47
t .Skipf ("Test skipped, OS unsupported: %v" , runtime .GOOS )
49
48
}
50
49
@@ -172,7 +171,7 @@ VARIANT="Container Image"`
172
171
173
172
func TestExtract (t * testing.T ) {
174
173
// supported OSes
175
- if ! slices . Contains ([] string { "linux" }, runtime .GOOS ) {
174
+ if runtime .GOOS == "windows" {
176
175
t .Skipf ("Test skipped, OS unsupported: %v" , runtime .GOOS )
177
176
}
178
177
@@ -566,7 +565,7 @@ func TestExtract(t *testing.T) {
566
565
567
566
func TestExtract_VirtualFilesystem (t * testing.T ) {
568
567
// supported OSes
569
- if ! slices . Contains ([] string { "linux" }, runtime .GOOS ) {
568
+ if runtime .GOOS == "windows" {
570
569
t .Skipf ("Test skipped, OS unsupported: %v" , runtime .GOOS )
571
570
}
572
571
You can’t perform that action at this time.
0 commit comments