Refined code and documentations.

This commit is contained in:
lucus 2016-12-26 04:22:06 +09:00
parent c871518ca0
commit b090a0ff67
2 changed files with 21 additions and 22 deletions

2
if.go
View file

@ -52,6 +52,7 @@ func New(config Config) (ifce *Interface, err error) {
// NewTAP creates a new TAP interface whose name is ifName. If ifName is empty, a
// default name (tap0, tap1, ... ) will be assigned. ifName should not exceed
// 16 bytes. TAP interfaces are not supported on darwin.
// ifName cannot be specified on windows, you will need ifce.Name() to use some cmds.
//
// Note: this function is deprecated and will be removed from the library.
// Please use New() instead.
@ -61,6 +62,7 @@ func NewTAP(ifName string) (ifce *Interface, err error) {
// NewTUN creates a new TUN interface whose name is ifName. If ifName is empty, a
// default name (tap0, tap1, ... ) will be assigned. ifName should not exceed
// ifName cannot be specified on windows, you will need ifce.Name() to use some cmds.
//
// Note: this function is deprecated and will be removed from the library.
// Please use New() instead.