This repository was archived by the owner on Jun 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Expand file tree Collapse file tree 2 files changed +27
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,29 @@ Local Address: [x.x.x.x]
4747Test connection...Success
4848```
4949
50+ ### 2. get
51+
52+ ** SYNTAX:**
53+
54+ ``` bash
55+ fgit get [URL< string> ] [Path< string> ] [--help]
56+ ```
57+
58+ ** FUNCTION:**
59+
60+ This command line is for downloading. Will auto convert github download link to fastgit.
61+
62+ ** EXAMPLE:**
63+
64+ ``` bash
65+ > fgit get https://github.com/fastgitorg/fgit-go/archive/master.zip
66+ File with the same name exists. New file will cover the old file.
67+ Do you want to continue? [Y/n]y
68+ Redirect url -> https://download.fastgit.org/fastgitorg/fgit-go/archive/master.zip
69+ Downloading...
70+ Finished.
71+ ```
72+
5073## Difference between fgit
5174
5275[ fgit] ( https://github.com/fastgitorg/fgit ) by @xkeyc only provides clone operation support, but fgit-go provides push and etc.
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ func main() {
122122 " Build by KevinZonda with GoLang\n " +
123123 "EXTRA-SYNTAX\n " +
124124 " fgit debug [URL<string>] [--help]\n " +
125+ " fgit get [URL<string>] [Path<string>] [--help]" +
125126 " If you wan to known more about extra-syntax, try to use --help" )
126127 os .Exit (0 )
127128 }
@@ -199,8 +200,8 @@ func get(url, fpath string) {
199200 " Download with FastGit automatically\n " +
200201 "SYNTAX\n " +
201202 " fgit [--help]\n " +
202- " fgit get [url <string>]\n " +
203- " fgit get [url <string>] [path <string>]\n " +
203+ " fgit get [URL <string>]\n " +
204+ " fgit get [URL <string>] [Path <string>]\n " +
204205 "EXAMPLE\n " +
205206 " fgit get https://github.com/fastgitorg/fgit-go/archive/master.zip" )
206207 os .Exit (0 )
@@ -242,7 +243,7 @@ func downloadFile(url, fpath string) {
242243 startDown:
243244 newUrl := strings .Replace (url , "https://github.com" , "https://download.fastgit.org" , - 1 )
244245 if newUrl != url {
245- fmt .Println ("Redirect url ->" , newUrl )
246+ fmt .Println ("Redirect ->" , newUrl )
246247 }
247248 fmt .Println ("Downloading..." )
248249 resp , err := http .Get (newUrl )
You can’t perform that action at this time.
0 commit comments