Commit graph

7 commits

Author SHA1 Message Date
40ac16261e
feat!: fix Drop semantics and add RemoveAt function
BREAKING CHANGE: Drop function now correctly drops first N elements
instead of removing element at specific index.

Changes:
- Renamed old Drop behavior to RemoveAt function
- Implemented correct Drop semantics (drop first N elements)
- Added comprehensive tests for both functions

Drop (NEW behavior):
- Drop([]int{1,2,3,4,5}, 2) → [3,4,5] (drops first 2 elements)
- Returns empty slice if n >= len(values)
- Returns original slice if n <= 0

RemoveAt (OLD Drop behavior):
- RemoveAt([]int{1,2,3,4,5}, 2) → [1,2,4,5] (removes index 2)
- Returns original slice if index out of bounds
- Pre-allocates with capacity len(values)-1

Tests added:
- Drop: 5 tests (basic, none, all, empty, single)
- RemoveAt: 6 tests (basic, first, last, bounds, empty, single)

Documentation updated:
- README.md: Added RemoveAt to function list
- CLAUDE.md: Marked Drop semantics as fixed
- ACTION_PLAN.md: Updated completion status

Migration guide:
- Old: Drop(slice, index) → New: RemoveAt(slice, index)
- New Drop usage: Drop(slice, n) drops first n elements

Coverage: 98.8% (maintained)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 14:04:58 +01:00
Daniel Smith
8c78743f1a
[CHORE] bump docker golang version and dependencies (#40) 2025-07-14 17:13:22 +02:00
e0fe93efaa
update to go 1.23 2024-09-08 19:39:27 +02:00
64fcfee748 update go version 2023-06-07 14:55:06 +02:00
Ruidy
3bfe1aca18
Code coverage (#15)
* 👷 adding test and push coverage

* ⬆️ use official Go 1.18 image

Co-authored-by: Ruidy <rnemausat@newstore.com>
2022-03-18 18:22:01 +01:00
Ruidy
ad518df993 feat: filter 2021-12-28 19:36:36 -04:00
Ruidy
d27ed24589 feat: map 2021-12-28 19:26:42 -04:00