Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin committed Jun 6, 2023
1 parent 6e518a2 commit b73fc88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/integrationbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ func (s *IntegrationBase) randomizeStr(id string) string {

func (s *IntegrationBase) printWorkflowHistory(namespace string, execution *commonpb.WorkflowExecution) {
events := s.getHistory(namespace, execution)
fmt.Println(s.formatHistory(&historypb.History{Events: events}))
_, _ = fmt.Println(s.formatHistory(&historypb.History{Events: events}))
}

//lint:ignore U1000 used for debugging.
func (s *IntegrationBase) printWorkflowHistoryCompact(namespace string, execution *commonpb.WorkflowExecution) {
events := s.getHistory(namespace, execution)
fmt.Println(s.formatHistoryCompact(&historypb.History{Events: events}))
_, _ = fmt.Println(s.formatHistoryCompact(&historypb.History{Events: events}))
}

func (s *IntegrationBase) getHistory(namespace string, execution *commonpb.WorkflowExecution) []*historypb.HistoryEvent {
Expand Down Expand Up @@ -343,7 +343,7 @@ func (s *IntegrationBase) formatHistoryCompact(history *historypb.History) strin
s.T().Helper()
var sb strings.Builder
for _, event := range history.Events {
sb.WriteString(fmt.Sprintf("%3d %s\n", event.GetEventId(), event.GetEventType()))
_, _ = sb.WriteString(fmt.Sprintf("%3d %s\n", event.GetEventId(), event.GetEventType()))
}
if sb.Len() > 0 {
return sb.String()[:sb.Len()-1]
Expand All @@ -359,7 +359,7 @@ func (s *IntegrationBase) formatHistory(history *historypb.History) string {
eventAttrsMap := s.structToMap(eventAttrs)
eventAttrsJson, err := json.Marshal(eventAttrsMap)
s.NoError(err)
sb.WriteString(fmt.Sprintf("%3d %s %s\n", event.GetEventId(), event.GetEventType(), string(eventAttrsJson)))
_, _ = sb.WriteString(fmt.Sprintf("%3d %s %s\n", event.GetEventId(), event.GetEventType(), string(eventAttrsJson)))
}
if sb.Len() > 0 {
return sb.String()[:sb.Len()-1]
Expand Down Expand Up @@ -471,7 +471,7 @@ func (s *IntegrationBase) parseHistory(expectedHistory string) (string, map[int6
if strings.HasPrefix(fields[i], "//") {
break
}
jb.WriteString(fields[i])
_, _ = jb.WriteString(fields[i])
}
if jb.Len() > 0 {
var eventAttrs map[string]any
Expand Down

0 comments on commit b73fc88

Please sign in to comment.