Skip to content

Commit

Permalink
Merge pull request #10 from kolyshkin/mountinfo-fix-win
Browse files Browse the repository at this point in the history
mountinfo: fix windows build
  • Loading branch information
kolyshkin authored Mar 20, 2020
2 parents 7284fba + ca8a677 commit 6154f11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mountinfo/mountinfo_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ package mountinfo

import (
"fmt"
"io"
"runtime"
)

func parseMountTable(f FilterFunc) ([]*Info, error) {
func parseMountTable(_ FilterFunc) ([]*Info, error) {
return nil, fmt.Errorf("mount.parseMountTable is not implemented on %s/%s", runtime.GOOS, runtime.GOARCH)
}

func parseInfoFile(_ io.Reader, f FilterFunc) ([]*Info, error) {
return parseMountTable(f)
}
8 changes: 7 additions & 1 deletion mountinfo/mountinfo_windows.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package mountinfo

func parseMountTable(f FilterFunc) ([]*Info, error) {
import "io"

func parseMountTable(_ FilterFunc) ([]*Info, error) {
// Do NOT return an error!
return nil, nil
}

func parseInfoFile(_ io.Reader, f FilterFunc) ([]*Info, error) {
return parseMountTable(f)
}

0 comments on commit 6154f11

Please sign in to comment.