Use generics internally

Đang mở
#533 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
backend

Hướng nghiên cứu

Start by checking the module's Go version declaration and locating repeated slice-mapping boilerplate. The issue proposes raising the minimum Go version to 1.18 and adding a generic mapSlice helper; identify representative call sites and existing tests before making changes. Done means the minimum version and internal usage are updated and the relevant tests pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I've purposefully not used generics for a long time internally because I didn't want to bump the required go version to 1.18 (it's currently go 1.17).

That's quite a few versions ago now, so it should be fine to bump this to go 1.18 and start using generics internally.

In particular, having a mapSlice[T, U any](s []T, func(T) U) []U helper would clean up a lot of repeated boilerplate.

Ngôn ngữ chính
Go
Star
176
Fork
27
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của peterstace/simplefeatures

Tất cả issue của peterstace/simplefeatures

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.