diff --git a/network/default.go b/network/default.go index ff1d6c4b..42837536 100644 --- a/network/default.go +++ b/network/default.go @@ -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, diff --git a/network/network.go b/network/network.go index a4e21ca9..f7251d60 100644 --- a/network/network.go +++ b/network/network.go @@ -16,3 +16,8 @@ var ( DefaultAddress = ":0" DefaultNetwork = NewNetwork() ) + +// NewNetwork returns a new network interface +func NewNetwork(opts ...Option) Network { + return newNetwork(opts...) +}