-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feature addreg code ways #268
base: main
Are you sure you want to change the base?
Conversation
@mssola Do we plan to have the cli implementation reworked? If this is the case (what I hope) we should maybe wait if this functionality is not provided by the library itself (idk, https://github.com/urfave/cli) What do you think @paragjain0910? |
That is true... That being said, when do we want to do such a thing? Is there any epic you think that could work out? If so, let's talk about it during the workshop next week and plan things. |
I was going through the documentation of urfave. Here the key points :
Also I tried creating a sample go file using urfave for supporting the above registration code features. @felixsch @mssola you can also have a look once, maybe it can help in reflecting upon the effort required to bring the change. Given these points, I would recommend reworking the CLI implementation using urfave/cli. |
@paragjain0910 thanks for the pointers. I have had some experience with https://github.com/urfave/cli in the past (e.g. back when I was involved with https://github.com/SUSE/zypper-docker, even if that was an old version). So far I believe that it would be the right choice. That being said, this would be a big change and I believe that the workshop next week can clarify when and how to apply this change. Moreover, I'd even envision a SUSEConnect which can break backwards compatibility, and have a proper action-like system in which you would So, food for thought, @felixsch 😄 |
SUSE Connect - Registration Code Input Handling
New Enhancement Added
Support for Two New Ways to Pass Registration Codes
Standard Input (stdin):
-r -
, you can pass the registration code directly from stdin.File Input:
-r @/file/path
, you can specify a file path that contains the registration code. The current directory is considered to be same as of the suseconnect.go file. Pass the path reference accordingly.processToken
Function DocumentationThe
processToken
function is a part of thesuseconnect
package located in thecmd/suseconnect/suseconnect.go
file. This function is responsible for processing the token input. The token can be:@
, or-
indicating that the registration code should be read from stdin.Added the Test cases as well.
Function Signature