move NewNetwork

This commit is contained in:
Asim Aslam 2019-07-31 15:37:12 +01:00
parent 2d09e74b0e
commit 318367cd71
2 changed files with 7 additions and 2 deletions

View File

@ -24,8 +24,8 @@ func (n *network) Close() error {
return n.options.Server.Stop()
}
// NewNetwork returns a new network node
func NewNetwork(opts ...Option) Network {
// newNetwork returns a new network node
func newNetwork(opts ...Option) Network {
options := Options{
Name: DefaultName,
Address: DefaultAddress,

View File

@ -16,3 +16,8 @@ var (
DefaultAddress = ":0"
DefaultNetwork = NewNetwork()
)
// NewNetwork returns a new network interface
func NewNetwork(opts ...Option) Network {
return newNetwork(opts...)
}