-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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.
- Clone or download the repository.
- Run
./init.sh github.com/my-fancy-org/my-cool-fn
. - Should update as following:
go.mod
gets updated togithub.com/my-fancy-org/my-cool-fn
.fn.go
gets updated togithub.com/my-fancy-org/my-cool-fn/input/v1beta1
.- Replace
function-template-go
withmy-cool-fn
Steps to Reproduce
- Clone or download the repository.
- Run
./init.sh my-cool-fn
. - Verify the following:
go.mod
gets updated togithub.com/crossplane/my-cool-fn
.fn.go
gets updated togithub.com/crossplane/my-cool-fn/input/v1beta1
.
Environment Details
- Function version: main branch
tomassatka
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working