-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto complete function images for eval command #2449
Conversation
excitement intensifies |
db3aed4
to
3adccab
Compare
LGTM, thanks for adding the test. @mengqiy is the spec for the catalog JSON defined somewhere? Could be interesting for @natasha41575 and @yuwenma to examine eventually and figure out how to build in similar functionality into kustomize. @bgrant0607 was interested in auto complete for functions, but I am not sure if there was an issue for it. |
found the relevant issue and comments: #2344 |
for fnName, fnInfo := range jsonData { | ||
var latestVersion string | ||
for version := range fnInfo { | ||
if latestVersion < version { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use https://pkg.go.dev/golang.org/x/mod/semver for the comparison.
It is defined in go/kpt-fn-metadata. It is used in the site generation script: https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/scripts/generate_catalog/generate_catalog.go#L74-L98 |
This PR improves the discoverability of functions by providing tab completion for function images in the catalog available at https://catalog.kpt.dev/ (https://catalog.kpt.dev/catalog.json). Latest version for the image is suggested.
cc @Pitta @mikebz @grmoon