Ver Fonte

modify the goctl gensvc template (#323)

FengZhang há 4 anos atrás
pai
commit
a926cb514f
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      tools/goctl/rpc/generator/gensvc.go

+ 2 - 2
tools/goctl/rpc/generator/gensvc.go

@@ -15,12 +15,12 @@ const svcTemplate = `package svc
 import {{.imports}}
 import {{.imports}}
 
 
 type ServiceContext struct {
 type ServiceContext struct {
-	c config.Config
+	Config config.Config
 }
 }
 
 
 func NewServiceContext(c config.Config) *ServiceContext {
 func NewServiceContext(c config.Config) *ServiceContext {
 	return &ServiceContext{
 	return &ServiceContext{
-		c:c,
+		Config:c,
 	}
 	}
 }
 }
 `
 `