Skip to content

Commit 4af76fd

Browse files
committed
rename getData to getHistoryEventData
1 parent 4ee530d commit 4af76fd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/common/util/stringer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ func valueToString(v reflect.Value) string {
7878

7979
// HistoryEventToString convert HistoryEvent to string
8080
func HistoryEventToString(e *s.HistoryEvent) string {
81-
data := getData(e)
81+
data := getHistoryEventData(e)
8282

8383
return e.GetEventType().String() + ": " + anyToString(data)
8484
}
8585

86-
func getData(e *s.HistoryEvent) interface{} {
86+
func getHistoryEventData(e *s.HistoryEvent) interface{} {
8787
switch e.GetEventType() {
8888
case s.EventTypeWorkflowExecutionStarted:
8989
return e.WorkflowExecutionStartedEventAttributes

internal/common/util/stringer_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func TestHistoryEventToString(t *testing.T) {
142142

143143
// This just tests that we pick the right attibutes to return
144144
// the other attributes will be nil
145-
func Test_getData(t *testing.T) {
145+
func Test_getHistoryEventData(t *testing.T) {
146146
cases := []struct {
147147
event *s.HistoryEvent
148148
expected interface{}
@@ -316,7 +316,7 @@ func Test_getData(t *testing.T) {
316316
name, err := tc.event.GetEventType().MarshalText()
317317
require.NoError(t, err)
318318
t.Run(string(name), func(t *testing.T) {
319-
require.Equal(t, tc.expected, getData(tc.event))
319+
require.Equal(t, tc.expected, getHistoryEventData(tc.event))
320320
})
321321
}
322322
}

0 commit comments

Comments
 (0)