Open henrybarreto opened 2 years ago
Build the CLI sub-command upload with its flags without calling the internal logic.
upload
-p password
-t 1
-a 127.0.0.1
when using with no flags, get the file name: photo.jpeg
photo.jpeg
parachute client upload photo.jpeg
when -p is set, get the value and the file name: Example123 and photo.jpeg
-p
Example123
parachute client upload -p Example123 photo.jpeg
when -t is set, get the value and the file name: 1 and photo.jpeg
-t
1
parachute client upload -t 1 photo.jpeg
when -a is set, get the value and the file name: 127.0.0.1 and photo.jpeg
-a
127.0.0.1
parachute client upload -a 127.0.0.1 photo.jpeg
You don't need to implement the client's; just create, through the clap build pattern, the sub-command and flags. https://github.com/henrybarreto/parachute/blob/6ad86fdb6a5a4f968b8d4d7b42652bc294f4b2b3/src/main.rs#L25-L29
clap
At present, you just need to implement the "flat" client, without the flags.
Build the CLI sub-command
upload
with its flags without calling the internal logic.Flags
-p password
-t 1
-a 127.0.0.1
Usage
when using with no flags, get the file name:
photo.jpeg
when
-p
is set, get the value and the file name:Example123
andphoto.jpeg
when
-t
is set, get the value and the file name:1
andphoto.jpeg
when
-a
is set, get the value and the file name:127.0.0.1
andphoto.jpeg
Where