This repository was archived by the owner on Jun 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +0
-80
lines changed
Expand file tree Collapse file tree 4 files changed +0
-80
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ const (
1212 " fgit get [URL<string>] [Path<string>] [--help|-h]\n " +
1313 " fgit conv [Target<string>] [--help|-h]\n " +
1414 " fgit jsdget [URL<string>] [Path<string>]\n " +
15- " fgit host [show]\n " +
1615 " If you want to known more about extra-syntax, try to use --help"
1716 jsdHelpMsg = "FastGit JsdGet Command Line Tool\n " +
1817 "=============================\n " +
@@ -64,17 +63,4 @@ const (
6463 " fgit convert\n " +
6564 "EXAMPLE\n " +
6665 " fgit conv gh"
67- hostHelpMsg = "FastGit Host Command Line Tool\n " +
68- "==============================\n " +
69- "REMARKS\n " +
70- " Get hosts from FastGit Emergency Network Framework Api\n " +
71- "SYNTAX\n " +
72- " fgit host [show]\n " +
73- "EXAMPLE\n " +
74- " fgit host show"
75- )
76-
77- const (
78- // FastGit UK Emergency Network Framework Host Api
79- fgEnfHostApi = "https://api.fastgit.org/enf/host"
8066)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -34,9 +34,6 @@ func main() {
3434 case "conv" , "convert" :
3535 runByArgs (& ConvFunc {})
3636
37- case "host" :
38- runByArgs (& HostFunc {})
39-
4037 case "-v" , "--version" , "version" :
4138 showVersion ()
4239 }
Original file line number Diff line number Diff line change @@ -27,27 +27,6 @@ func downloadFile(url, path string) {
2727 fmt .Println ("Finished." )
2828}
2929
30- func getResponseString (url string ) string {
31- var client http.Client
32- req , err := http .NewRequest ("GET" , url , nil )
33- checkErr (err , "Http.Get create failed!" , 1 )
34- req .Header .Set ("User-Agent" , "fgit/" + version )
35- checkErr (err , "Http.Get create failed!" , 1 )
36-
37- resp , err := client .Do (req )
38- defer resp .Body .Close ()
39- checkErr (err , "Http request failed!" , 1 )
40-
41- if resp .StatusCode != http .StatusOK {
42- fmt .Printf ("Error: response is not OK is %v!\n " , resp .StatusCode )
43- os .Exit (1 )
44- }
45-
46- bodyBytes , err := io .ReadAll (resp .Body )
47- checkErr (err , "io.ReadAll failed!" , 1 )
48- return string (bodyBytes )
49- }
50-
5130func isDir (path string ) bool {
5231 s , err := os .Stat (path )
5332 if err != nil {
You can’t perform that action at this time.
0 commit comments