Documentation ¶
Overview ¶
Package net supplies some assistant functions about net, such as the gateway ip and routes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRouteTableNotImplemented = errors.New("route table has not implemented")
ErrRouteTableNotImplemented is returned when the route table has not implemented.
Functions ¶
func GetDefaultGateway ¶
GetDefaultGateway returns the default gateway.
Types ¶
type Routes ¶
type Routes []Route
Routes is a set of Routes.
func (Routes) DefaultGateway ¶
DefaultGateway returns the default gateway. Return nil if not exist.
Click to show internal directories.
Click to hide internal directories.