Skip to content

Commit

Permalink
fix: fix slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 4, 2024
1 parent 5b6b5ce commit 349f78b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (c *Client) AddScheduleActionRecord(ctx context.Context, scheduleActionReco

// AddScheduleActionRecords adds multiple schedule action records to the database
func (c *Client) AddScheduleActionRecords(ctx context.Context, scheduleActionRecords []model.ScheduleActionRecord) ([]model.ScheduleActionRecord, errors.EdgeX) {
records := make([]model.ScheduleActionRecord, len(scheduleActionRecords))
records := make([]model.ScheduleActionRecord, 0, len(scheduleActionRecords))
for _, record := range scheduleActionRecords {
r, err := c.AddScheduleActionRecord(ctx, record)
if err != nil {
Expand Down

0 comments on commit 349f78b

Please sign in to comment.