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

Add command to check uuid pattern #6

Closed
samit22 opened this issue Oct 2, 2020 · 5 comments
Closed

Add command to check uuid pattern #6

samit22 opened this issue Oct 2, 2020 · 5 comments
Assignees
Labels
good first issue Good for newcomers Hactoberfest Hactoberfest 2020

Comments

@samit22
Copy link
Owner

samit22 commented Oct 2, 2020

Command: uuid check
This should check UUID pattern and return valid/invalid.

@samit22 samit22 added good first issue Good for newcomers Hactoberfest Hactoberfest 2020 labels Oct 2, 2020
@norbinsh
Copy link
Contributor

norbinsh commented Oct 4, 2020

mind if i take this one @samit22?

can either validate using regex (slower) or through https://godoc.org/github.com/google/uuid#Parse (add dependency).

thoughts?

@samit22
Copy link
Owner Author

samit22 commented Oct 4, 2020

Sure @norbinsh, I would say regex. Less dependency.

@norbinsh
Copy link
Contributor

norbinsh commented Oct 4, 2020

Sounds good.
I noticed you already have the pattern as part of your existing test, if you are happy with it, we can use the same.

Could you please confirm I am aligned with the intent here:

We want to add a new command, which the user will have to provide input to (the UUID to check), and it will return true/false depending on whether there was a match.

The below will return true
uuid check 825926d4-9c30-4230-8467-5147dbbf3d25

While the below will return false
uuid check 825926d49c30423084675147dbbf3d25

@samit22
Copy link
Owner Author

samit22 commented Oct 5, 2020

Sounds good.
I noticed you already have the pattern as part of your existing test, if you are happy with it, we can use the same.

We can use the same pattern.

Could you please confirm I am aligned with the intent here:

We want to add a new command, which the user will have to provide input to (the UUID to check), and it will return true/false depending on whether there was a match.

The below will return true
uuid check 825926d4-9c30-4230-8467-5147dbbf3d25

While the below will return false
uuid check 825926d49c30423084675147dbbf3d25

Yeah, that's right, I'm also thinking to add support for multiple arguments and return true false for each, I leave that up to you.

@samit22
Copy link
Owner Author

samit22 commented Oct 5, 2020

Fixed by #12

@samit22 samit22 closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hactoberfest Hactoberfest 2020
Projects
None yet
Development

No branches or pull requests

2 participants