Skip to content

Commit c5d402c

Browse files
committed
chore: small fixes
Signed-off-by: Valery Piashchynski <[email protected]>
1 parent 068533f commit c5d402c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

internal.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ func (p *Plugin) initPool() error {
4646
dc = append(dc, converter.NewProtoPayloadConverter())
4747
dc = append(dc, converter.NewJSONPayloadConverter())
4848

49-
if p.temporal.customDataConverter != nil {
50-
dc = append(dc, p.temporal.customDataConverter)
49+
if p.temporal.customPayloadConverter != nil {
50+
dc = append(dc, p.temporal.customPayloadConverter)
5151
}
5252

5353
rrdc := dataconverter.NewDataConverter(converter.NewCompositeDataConverter(dc...))
@@ -146,7 +146,7 @@ func (p *Plugin) initTemporalClient(phpSdkVersion string, flags map[string]strin
146146

147147
if val, ok := flags[APIKey]; ok {
148148
if val != "" {
149-
p.apiKey.Store(ptrTo(val))
149+
p.apiKey.Store(ptr(val))
150150
}
151151
}
152152

plugin.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ type temporal struct {
6262
client tclient.Client
6363
workers []worker.Worker
6464

65-
interceptors map[string]api.Interceptor
66-
customDataConverter converter.PayloadConverter
65+
interceptors map[string]api.Interceptor
66+
customPayloadConverter converter.PayloadConverter
6767
}
6868

6969
type Plugin struct {
@@ -163,7 +163,7 @@ func (p *Plugin) Init(cfg api.Configurer, log Logger, server api.Server) error {
163163
// initialize interceptors
164164
p.temporal.interceptors = make(map[string]api.Interceptor)
165165
// empty
166-
p.apiKey.Store(ptrTo(""))
166+
p.apiKey.Store(ptr(""))
167167

168168
return nil
169169
}
@@ -413,7 +413,7 @@ func (p *Plugin) Collects() []*dep.In {
413413
p.mu.Unlock()
414414
}, (*api.Interceptor)(nil)),
415415
dep.Fits(func(pp any) {
416-
p.temporal.customDataConverter = pp.(converter.PayloadConverter)
416+
p.temporal.customPayloadConverter = pp.(converter.PayloadConverter)
417417
}, (*converter.PayloadConverter)(nil)),
418418
}
419419
}
@@ -426,6 +426,6 @@ func (p *Plugin) RPC() any {
426426
return &rpc{plugin: p, client: p.temporal.client}
427427
}
428428

429-
func ptrTo[T any](v T) *T {
429+
func ptr[T any](v T) *T {
430430
return &v
431431
}

0 commit comments

Comments
 (0)