Skip to content
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

feat: function name matches KService name #317

Merged
merged 2 commits into from
Apr 26, 2021
Merged

Conversation

zroubalik
Copy link
Contributor

Signed-off-by: Zbynek Roubalik zroubali@redhat.com

  • Error message printed before the actual creation:
$  ./func create test-                                                                                                                          
Error: Function name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
  • Interactive session and incorrect name specified at the input -> error:
$ ./func create test- -c                                                                                                                             
Error: Function name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
  • Interactive session with valid name, but with an invalid Project path later specified by user -> the prompt loops till valid name is entered:
$ ./func create test -c                                                                                                                               
Project path (/Users/zroubali/go/src/github.com/boson-project/func/test): test-
Error: Function name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
Project path (/Users/zroubali/go/src/github.com/boson-project/func/test): test
Runtime (node): 
Trigger (http): 

Fixes: #276

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
Copy link
Member

@lance lance left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I like that there are no longer two names (service and function).

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
@zroubalik zroubalik merged commit 541e858 into knative:main Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function name should match service name
2 participants