Skip to content

Commit c404689

Browse files
committed
use wrapper function instead of variable for freebsd
This variable made me look various times to find if it was (e.g.) needed to stub out the function in (unit)tests, but it looks like it was only there for convenience (not having to define a function). Let's change it to a regular function that wraps the underlying implementation to prevent this confusion. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 21f3f33 commit c404689

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

dev_freebsd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ package archive
44

55
import "golang.org/x/sys/unix"
66

7-
var mknod = unix.Mknod
7+
func mknod(path string, mode uint32, dev uint64) error {
8+
return unix.Mknod(path, mode, dev)
9+
}

0 commit comments

Comments
 (0)