Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Repository initialization has hard assumptions

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

@BigGold1310 đang làm issue này rồi.

Từ ngày 17/6/2024.

  • #75 của @BigGold1310 — đang mở

Đá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
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go, shell
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu với init.sh và chạy lệnh khởi tạo được báo cáo, sau đó kiểm tra go.mod và fn.go để theo dõi cách module và các đường dẫn import được thay đổi. Hoàn thành khi chấp nhận một đường dẫn module Go đầy đủ và cập nhật nhất quán go.mod, fn.go cùng các tham chiếu đến function-template-go, bao gồm cả các thay thế trong example/*.

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

Mô tả

bug
What Happened?

I've cloned the repository and run ./init.sh my-cool-fn. The init.sh script is currently only changing the package names but not updating the Go module path. Updating the Go module path is essential for the package to function properly and to facilitate hosting on GitHub/GitLab.

Proposal

I expect the init.sh script to take the Go module path as its first argument. This will ensure that both the import paths and the Go module paths are updated correctly. To maintain compatibility with the example/* replacements, we can extract and use the last segment of the path as the package name.

  1. Clone or download the repository.
  2. Run ./init.sh github.com/my-fancy-org/my-cool-fn.
  3. Should update as following:
    1. go.mod gets updated to github.com/my-fancy-org/my-cool-fn.
    2. fn.go gets updated to github.com/my-fancy-org/my-cool-fn/input/v1beta1.
    3. Replace function-template-go with my-cool-fn
Steps to Reproduce
  1. Clone or download the repository.
  2. Run ./init.sh my-cool-fn.
  3. Verify the following:
    1. go.mod gets updated to github.com/crossplane/my-cool-fn.
    2. fn.go gets updated to github.com/crossplane/my-cool-fn/input/v1beta1.
Environment Details
  • Function version: main branch
Ngôn ngữ chính
Go
Star
40
Fork
38
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

  • Có Dockerfile hoặc 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 crossplane/function-template-go

Tất cả issue của crossplane/function-template-go

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.