This repository was archived by the owner on Jul 16, 2022. It is now read-only.
File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ struct GistRequest {
34
34
35
35
#[ derive( Debug , PartialEq , Serialize , Deserialize ) ]
36
36
struct FileMetadata {
37
- // TODO: support binary file
38
37
content : String ,
39
38
}
40
39
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ pub fn upload(
8
8
login : & config:: Login ,
9
9
secret : bool ,
10
10
description : Option < & str > ,
11
- files : & Vec < PathBuf > ,
11
+ files : & [ PathBuf ] ,
12
12
) -> Result < ( ) > {
13
13
let client = api:: Client :: build ( ) ?;
14
14
let res = client. upload ( & login, !secret, description, files) ?;
Original file line number Diff line number Diff line change @@ -31,8 +31,11 @@ struct Account {
31
31
32
32
#[ derive( Debug , StructOpt ) ]
33
33
enum Subcommand {
34
+ /// Login to GitHub with OAuth2 device flow
34
35
Login ( Login ) ,
36
+ /// Upload the files to GitHub Gist
35
37
Upload ( Upload ) ,
38
+ /// Browse the gists
36
39
List ( List ) ,
37
40
}
38
41
@@ -45,10 +48,15 @@ struct Login {
45
48
46
49
#[ derive( Debug , StructOpt ) ]
47
50
struct Upload {
51
+ /// Upload the files as secret gist
48
52
#[ structopt( short) ]
49
53
secret : bool ,
54
+
55
+ /// Add a description to gist
50
56
#[ structopt( short) ]
51
57
description : Option < String > ,
58
+
59
+ /// Specify the files to upload
52
60
#[ structopt( name = "FILES" , parse( from_os_str) , required = true ) ]
53
61
files : Vec < PathBuf > ,
54
62
}
You can’t perform that action at this time.
0 commit comments