Skip to content

Commit

Permalink
rename NewDokodemoDoor
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Jan 13, 2017
1 parent 195594b commit 88b607d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions proxy/dokodemo/dokodemo.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type DokodemoDoor struct {
meta *proxy.InboundHandlerMeta
}

func NewDokodemoDoor(ctx context.Context, config *Config) (*DokodemoDoor, error) {
func New(ctx context.Context, config *Config) (*DokodemoDoor, error) {
space := app.SpaceFromContext(ctx)
if space == nil {
return nil, errors.New("Dokodemo: No space in context.")
Expand Down Expand Up @@ -215,6 +215,6 @@ func (v *DokodemoDoor) HandleTCPConnection(conn internet.Connection) {

func init() {
common.Must(common.RegisterConfig((*Config)(nil), func(ctx context.Context, config interface{}) (interface{}, error) {
return NewDokodemoDoor(ctx, config.(*Config))
return New(ctx, config.(*Config))
}))
}
4 changes: 2 additions & 2 deletions proxy/dokodemo/dokodemo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestDokodemoTCP(t *testing.T) {
Protocol: internet.TransportProtocol_TCP,
}})

dokodemo, err := NewDokodemoDoor(ctx, &Config{
dokodemo, err := New(ctx, &Config{
Address: v2net.NewIPOrDomain(v2net.LocalHostIP),
Port: uint32(tcpServer.Port),
NetworkList: v2net.Network_TCP.AsList(),
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestDokodemoUDP(t *testing.T) {
Protocol: internet.TransportProtocol_TCP,
}})

dokodemo, err := NewDokodemoDoor(ctx, &Config{
dokodemo, err := New(ctx, &Config{
Address: v2net.NewIPOrDomain(v2net.LocalHostIP),
Port: uint32(udpServer.Port),
NetworkList: v2net.Network_UDP.AsList(),
Expand Down

0 comments on commit 88b607d

Please sign in to comment.