- Remove exported interfaces unused locally - Define interfaces to accept arguments - Return concrete types, not interfaces
14 lines
183 B
Go
14 lines
183 B
Go
package tun
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
type Tun struct {
|
|
mknod func(path string, mode uint32, dev int) (err error)
|
|
}
|
|
|
|
func New() *Tun {
|
|
return &Tun{
|
|
mknod: unix.Mknod,
|
|
}
|
|
}
|