File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ type handler struct {
7777
7878 paramDecoders map [reflect.Type ]ParamDecoder
7979
80- methodCaseTransformer MethodCaseTransformer
80+ methodTransformer MethodTransformer
8181
8282 tracer Tracer
8383 separator string
@@ -93,7 +93,7 @@ func makeHandler(sc ServerConfig) *handler {
9393 aliasedMethods : map [string ]string {},
9494 paramDecoders : sc .paramDecoders ,
9595
96- methodCaseTransformer : sc .methodCaseTransformer ,
96+ methodTransformer : sc .methodTransformer ,
9797
9898 maxRequestSize : sc .maxRequestSize ,
9999
@@ -131,8 +131,8 @@ func (s *handler) register(namespace string, r interface{}) {
131131 }
132132
133133 valOut , errOut , _ := processFuncOut (funcType )
134- if s .methodCaseTransformer != nil {
135- method .Name = s .methodCaseTransformer (method .Name )
134+ if s .methodTransformer != nil {
135+ method .Name = s .methodTransformer (method .Name )
136136 }
137137
138138 s .methods [namespace + s .separator + method .Name ] = methodHandler {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ type jsonrpcReverseClient struct{ reflect.Type }
1313
1414type ParamDecoder func (ctx context.Context , json []byte ) (reflect.Value , error )
1515
16- type MethodCaseTransformer func (string ) string
16+ type MethodTransformer func (string ) string
1717
1818const defaultSeparator = "."
1919
@@ -24,10 +24,10 @@ type ServerConfig struct {
2424 paramDecoders map [reflect.Type ]ParamDecoder
2525 errors * Errors
2626
27- reverseClientBuilder func (context.Context , * wsConn ) (context.Context , error )
28- tracer Tracer
29- methodCaseTransformer MethodCaseTransformer
30- separator string
27+ reverseClientBuilder func (context.Context , * wsConn ) (context.Context , error )
28+ tracer Tracer
29+ methodTransformer MethodTransformer
30+ separator string
3131}
3232
3333type ServerOption func (c * ServerConfig )
@@ -72,9 +72,9 @@ func WithNamespaceSeparator(separator string) ServerOption {
7272 }
7373}
7474
75- func WithMethodTransformer (methodCaseTransformer MethodCaseTransformer ) ServerOption {
75+ func WithMethodTransformer (methodTransformer MethodTransformer ) ServerOption {
7676 return func (c * ServerConfig ) {
77- c .methodCaseTransformer = methodCaseTransformer
77+ c .methodTransformer = methodTransformer
7878 }
7979}
8080
You can’t perform that action at this time.
0 commit comments