Skip to content

Commit

Permalink
Fix wasm
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <[email protected]>
  • Loading branch information
pjbgf committed Aug 4, 2024
1 parent 178de4a commit 74bddc8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
16 changes: 2 additions & 14 deletions osfs/os.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !js
// +build !js
//go:build !js && !wasm && !wasip1
// +build !js,!wasm,!wasip1

// Package osfs provides a billy filesystem for the OS.
package osfs
Expand Down Expand Up @@ -67,18 +67,6 @@ func WithDeduplicatePath(enabled bool) Option {
}
}

type options struct {
Type
deduplicatePath bool
}

type Type int

const (
ChrootOSFS Type = iota
BoundOSFS
)

func readDir(dir string) ([]os.FileInfo, error) {
entries, err := os.ReadDir(dir)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions osfs/os_js.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build js
// +build js
//go:build js || wasm || wasip1
// +build js wasm wasip1

package osfs

Expand Down
12 changes: 12 additions & 0 deletions osfs/os_options.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
package osfs

type Option func(*options)

type options struct {

Check failure on line 5 in osfs/os_options.go

View workflow job for this annotation

GitHub Actions / test (1.21.x)

options redeclared in this block

Check failure on line 5 in osfs/os_options.go

View workflow job for this annotation

GitHub Actions / test (1.22.x)

options redeclared in this block
Type
deduplicatePath bool
}

type Type int

const (
ChrootOSFS Type = iota
BoundOSFS
)
4 changes: 2 additions & 2 deletions osfs/os_wasip1_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build wasip1
// +build wasip1
//go:build wasip1 || wasm
// +build wasip1 wasm

package osfs

Expand Down

0 comments on commit 74bddc8

Please sign in to comment.