Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Repository initialization has hard assumptions

Aperta
#74 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

@BigGold1310 ci sta già lavorando.

Dal 17/6/2024.

  • #75 di @BigGold1310 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go, shell
Ambito
tooling

Direzione di ricerca

Inizia con init.sh ed esegui il comando di inizializzazione indicato, quindi esamina go.mod e fn.go per tracciare come vengono modificati il modulo e i percorsi di importazione. Il lavoro è completo quando viene accettato un percorso completo del modulo Go e vengono aggiornati in modo coerente go.mod, fn.go e i riferimenti a function-template-go, incluse le sostituzioni in example/*.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Go
Stelle
40
Fork
38
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di crossplane/function-template-go

Tutte le issue di crossplane/function-template-go

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.