Skip to content

Commit 26483e2

Browse files
authored
Merge pull request #41 from kolyshkin/FSTypeFilter
mountinfo: rename FstypeFilter -> FSTypeFilter, fix FilterFunc docs
2 parents a03c53e + 992946d commit 26483e2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

mountinfo/mountinfo_filters.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import "strings"
77
// and/or stop further processing if we found what we wanted.
88
//
99
// It takes a pointer to the Info struct (not fully populated,
10-
// currently only Mountpoint, Fstype, Source, and (on Linux)
11-
// VfsOpts are filled in), and returns two booleans:
10+
// currently only Mountpoint, FSType, Source, and (on Linux)
11+
// VFSOptions are filled in), and returns two booleans:
1212
//
1313
// - skip: true if the entry should be skipped
1414
// - stop: true if parsing should be stopped after the entry
@@ -45,8 +45,8 @@ func ParentsFilter(path string) FilterFunc {
4545
}
4646
}
4747

48-
// FstypeFilter returns all entries that match provided fstype(s).
49-
func FstypeFilter(fstype ...string) FilterFunc {
48+
// FSTypeFilter returns all entries that match provided fstype(s).
49+
func FSTypeFilter(fstype ...string) FilterFunc {
5050
return func(m *Info) (bool, bool) {
5151
for _, t := range fstype {
5252
if m.FSType == t {

mountinfo/mountinfo_linux_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,8 @@ func TestParseMountinfoFilters(t *testing.T) {
549549
{PrefixFilter("nonexistent"), 0},
550550
// 4 entries: /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup /sys /
551551
{ParentsFilter("/sys/fs/cgroup/cpu,cpuacct"), 4},
552-
{FstypeFilter("pstore"), 1},
553-
{FstypeFilter("proc", "sysfs"), 2},
552+
{FSTypeFilter("pstore"), 1},
553+
{FSTypeFilter("proc", "sysfs"), 2},
554554
}
555555

556556
var r bytes.Reader

0 commit comments

Comments
 (0)