Skip to content

creating a new slice in several job options because appending modifies original#809

Merged
JohnRoesler merged 2 commits intov2from
fix-slice-modification
Jan 3, 2025
Merged

creating a new slice in several job options because appending modifies original#809
JohnRoesler merged 2 commits intov2from
fix-slice-modification

Conversation

@JohnRoesler
Copy link
Contributor

@JohnRoesler JohnRoesler commented Dec 19, 2024

What does this do?

The original slices passed into the functions were being modified, leading to undesirable results!

Which issue(s) does this PR fix/relate to?

Resolves #807

List any changes that modify/break current functionality

Have you included tests for your changes?

TODO - add tests that fail before the changes, and pass after. This should be doable by calling the function more than once.

Did you document any new/modified functionality?

  • Updated example_test.go
  • Updated README.md

Notes

@JohnRoesler JohnRoesler marked this pull request as ready for review January 3, 2025 16:06
@JohnRoesler JohnRoesler merged commit bf75107 into v2 Jan 3, 2025
4 checks passed
@JohnRoesler JohnRoesler deleted the fix-slice-modification branch January 3, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - NewAtTimes Function Modifies Original Slice

1 participant