Skip to content

Commit accc1e7

Browse files
fix formatting issues
1 parent 3364bc8 commit accc1e7

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

gofsutil.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ func DeviceRescan(ctx context.Context,
196196
//
197197
// * Linux hosts use mount_namespaces to obtain mount information.
198198
//
199-
// Support for mount_namespaces was introduced to the Linux kernel
200-
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
201-
// 2004/02/04.
199+
// Support for mount_namespaces was introduced to the Linux kernel
200+
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
201+
// 2004/02/04.
202202
//
203-
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
204-
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
203+
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
204+
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
205205
//
206-
// * Darwin hosts parse the output of the "mount" command to obtain
207-
// mount information.
206+
// - Darwin hosts parse the output of the "mount" command to obtain
207+
// mount information.
208208
func GetMounts(ctx context.Context) ([]Info, error) {
209209
return fs.GetMounts(ctx)
210210
}

gofsutil_fs.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ func (fs *FS) DeviceRescan(ctx context.Context,
125125
//
126126
// * Linux hosts use mount_namespaces to obtain mount information.
127127
//
128-
// Support for mount_namespaces was introduced to the Linux kernel
129-
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
130-
// 2004/02/04.
128+
// Support for mount_namespaces was introduced to the Linux kernel
129+
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
130+
// 2004/02/04.
131131
//
132-
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
133-
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
132+
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
133+
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
134134
//
135-
// * Darwin hosts parse the output of the "mount" command to obtain
136-
// mount information.
135+
// - Darwin hosts parse the output of the "mount" command to obtain
136+
// mount information.
137137
func (fs *FS) GetMounts(ctx context.Context) ([]Info, error) {
138138
return fs.getMounts(ctx)
139139
}

gofsutil_mock.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -342,15 +342,15 @@ func (fs *mockfs) Unmount(ctx context.Context, target string) error {
342342
//
343343
// * Linux hosts use mount_namespaces to obtain mount information.
344344
//
345-
// Support for mount_namespaces was introduced to the Linux kernel
346-
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
347-
// 2004/02/04.
345+
// Support for mount_namespaces was introduced to the Linux kernel
346+
// in 2.2.26 (http://man7.org/linux/man-pages/man5/proc.5.html) on
347+
// 2004/02/04.
348348
//
349-
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
350-
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
349+
// The kernel documents the contents of "/proc/<pid>/mountinfo" at
350+
// https://www.kernel.org/doc/Documentation/filesystems/proc.txt.
351351
//
352-
// * Darwin hosts parse the output of the "mount" command to obtain
353-
// mount information.
352+
// - Darwin hosts parse the output of the "mount" command to obtain
353+
// mount information.
354354
func (fs *mockfs) GetMounts(ctx context.Context) ([]Info, error) {
355355
return fs.getMounts(ctx)
356356
}

gofsutil_mount.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@ type DeviceMountInfo struct {
7979
// Entry is a superset of Info and maps to the fields of a mount table
8080
// entry:
8181
//
82-
// (1) mount ID: unique identifier of the mount (may be reused after umount)
83-
// (2) parent ID: ID of parent (or of self for the top of the mount tree)
84-
// (3) major:minor: value of st_dev for files on filesystem
85-
// (4) root: root of the mount within the filesystem
86-
// (5) mount point: mount point relative to the process's root
87-
// (6) mount options: per mount options
88-
// (7) optional fields: zero or more fields of the form "tag[:value]"
89-
// (8) separator: marks the end of the optional fields
90-
// (9) filesystem type: name of filesystem of the form "type[.subtype]"
91-
// (10) mount source: filesystem specific information or "none"
92-
// (11) super options: per super block options
82+
// (1) mount ID: unique identifier of the mount (may be reused after umount)
83+
// (2) parent ID: ID of parent (or of self for the top of the mount tree)
84+
// (3) major:minor: value of st_dev for files on filesystem
85+
// (4) root: root of the mount within the filesystem
86+
// (5) mount point: mount point relative to the process's root
87+
// (6) mount options: per mount options
88+
// (7) optional fields: zero or more fields of the form "tag[:value]"
89+
// (8) separator: marks the end of the optional fields
90+
// (9) filesystem type: name of filesystem of the form "type[.subtype]"
91+
// (10) mount source: filesystem specific information or "none"
92+
// (11) super options: per super block options
9393
type Entry struct {
9494
// Root of the mount within the filesystem.
9595
Root string
@@ -264,7 +264,7 @@ func ReadProcMountsFrom(
264264
//
265265
// The argument list returned is built as follows:
266266
//
267-
// mount [-t $fsType] [-o $options] [$source] $target
267+
// mount [-t $fsType] [-o $options] [$source] $target
268268
func MakeMountArgs(
269269
ctx context.Context,
270270
source, target, fsType string,

gofsutil_removeduplicates.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ function. If the situation should ever change such that mount options
3636
number in the thousands then this function should defer to
3737
RemoveDuplicatesLinearOrdered instead of RemoveDuplicatesExponentialOrdered.
3838
39-
$ go test -run Bench -bench BenchmarkRemoveDuplicates -benchmem -v
40-
goos: darwin
41-
goarch: amd64
42-
pkg: github.com/thecodeteam/gofsutil
43-
BenchmarkRemoveDuplicates_Exponential_Ordered___SmallData-8 20000000 121 ns/op 0 B/op 0 allocs/op
44-
BenchmarkRemoveDuplicates_Exponential_Unordered_SmallData-8 20000000 99.0 ns/op 0 B/op 0 allocs/op
45-
BenchmarkRemoveDuplicates_Linear______Ordered___SmallData-8 2000000 715 ns/op 288 B/op 1 allocs/op
46-
BenchmarkRemoveDuplicates_Exponential_Ordered___BigData-8 20000 84731 ns/op 0 B/op 0 allocs/op
47-
BenchmarkRemoveDuplicates_Exponential_Unordered_BigData-8 10000 156660 ns/op 0 B/op 0 allocs/op
48-
BenchmarkRemoveDuplicates_Linear______Ordered___BigData-8 50000 36971 ns/op 20512 B/op 2 allocs/op
49-
PASS
50-
ok github.com/thecodeteam/gofsutil 22.085s
39+
$ go test -run Bench -bench BenchmarkRemoveDuplicates -benchmem -v
40+
goos: darwin
41+
goarch: amd64
42+
pkg: github.com/thecodeteam/gofsutil
43+
BenchmarkRemoveDuplicates_Exponential_Ordered___SmallData-8 20000000 121 ns/op 0 B/op 0 allocs/op
44+
BenchmarkRemoveDuplicates_Exponential_Unordered_SmallData-8 20000000 99.0 ns/op 0 B/op 0 allocs/op
45+
BenchmarkRemoveDuplicates_Linear______Ordered___SmallData-8 2000000 715 ns/op 288 B/op 1 allocs/op
46+
BenchmarkRemoveDuplicates_Exponential_Ordered___BigData-8 20000 84731 ns/op 0 B/op 0 allocs/op
47+
BenchmarkRemoveDuplicates_Exponential_Unordered_BigData-8 10000 156660 ns/op 0 B/op 0 allocs/op
48+
BenchmarkRemoveDuplicates_Linear______Ordered___BigData-8 50000 36971 ns/op 20512 B/op 2 allocs/op
49+
PASS
50+
ok github.com/thecodeteam/gofsutil 22.085s
5151
*/
5252
func RemoveDuplicates(a []string) []string {
5353
return RemoveDuplicatesExponentialOrdered(a)

0 commit comments

Comments
 (0)