Explorar o código

rename RegisterApp to Register

v2ray %!s(int64=9) %!d(string=hai) anos
pai
achega
a37819c330
Modificáronse 4 ficheiros con 4 adicións e 4 borrados
  1. 1 1
      app/dispatcher/dispatcher.go
  2. 1 1
      app/dns/dns.go
  3. 1 1
      app/proxyman/proxyman.go
  4. 1 1
      app/space.go

+ 1 - 1
app/dispatcher/dispatcher.go

@@ -29,7 +29,7 @@ func (this *contextedPacketDispatcher) DispatchToOutbound(destination v2net.Dest
 }
 
 func init() {
-	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
+	app.Register(APP_ID, func(context app.Context, obj interface{}) interface{} {
 		packetDispatcher := obj.(packetDispatcherWithContext)
 		return &contextedPacketDispatcher{
 			context:          context,

+ 1 - 1
app/dns/dns.go

@@ -35,7 +35,7 @@ func (this *contextedDnsCache) Add(domain string, ip net.IP) {
 }
 
 func init() {
-	app.RegisterApp(APP_ID, func(context app.Context, obj interface{}) interface{} {
+	app.Register(APP_ID, func(context app.Context, obj interface{}) interface{} {
 		dcContext := obj.(dnsCacheWithContext)
 		return &contextedDnsCache{
 			context:  context,

+ 1 - 1
app/proxyman/proxyman.go

@@ -27,7 +27,7 @@ func (this *inboundHandlerManagerWithContextImpl) GetHandler(tag string) (proxy.
 }
 
 func init() {
-	app.RegisterApp(APP_ID_INBOUND_MANAGER, func(context app.Context, obj interface{}) interface{} {
+	app.Register(APP_ID_INBOUND_MANAGER, func(context app.Context, obj interface{}) interface{} {
 		manager := obj.(inboundHandlerManagerWithContext)
 		return &inboundHandlerManagerWithContextImpl{
 			context: context,

+ 1 - 1
app/space.go

@@ -20,7 +20,7 @@ var (
 	metadataCache = make(map[ID]ForContextCreator)
 )
 
-func RegisterApp(id ID, creator ForContextCreator) {
+func Register(id ID, creator ForContextCreator) {
 	// TODO: check id
 	metadataCache[id] = creator
 }