You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to github.com/my-fancy-org/my-cool-fn.
fn.go gets updated to github.com/my-fancy-org/my-cool-fn/input/v1beta1.
Replace function-template-go with my-cool-fn
Steps to Reproduce
Clone or download the repository.
Run ./init.sh my-cool-fn.
Verify the following:
go.mod gets updated to github.com/crossplane/my-cool-fn.
fn.go gets updated to github.com/crossplane/my-cool-fn/input/v1beta1.
Environment Details
Function version: main branch
The text was updated successfully, but these errors were encountered:
What Happened?
I've cloned the repository and run
./init.sh my-cool-fn
. Theinit.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 theexample/*
replacements, we can extract and use the last segment of the path as the package name../init.sh github.com/my-fancy-org/my-cool-fn
.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
.function-template-go
withmy-cool-fn
Steps to Reproduce
./init.sh my-cool-fn
.go.mod
gets updated togithub.com/crossplane/my-cool-fn
.fn.go
gets updated togithub.com/crossplane/my-cool-fn/input/v1beta1
.Environment Details
The text was updated successfully, but these errors were encountered: