Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
[README] add pull support
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinZonda committed May 23, 2020
1 parent fe32170 commit 1c65f7e
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions fgit.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ func debugConnection(url string) bool {
}

func debug(url string) bool {
fmt.Println("" +
"FastGit Debug Command Line Tool\n" +
"===============================")
if url != "--help" {
fmt.Println("" +
"FastGit Debug Tool\n" +
"==================\n" +
"Remote Address:", url)
fmt.Println("Remote Address:", url)
fmt.Print("IP Address: ")
addr, err := net.LookupIP(strings.Replace(strings.Replace(url, "https://", "", -1), "http://", "", -1))
if err != nil {
Expand All @@ -60,8 +60,6 @@ func debug(url string) bool {
return debugConnection(url)
} else {
fmt.Println("" +
"FastGit Debug Command Line Tool\n" +
"===============================\n" +
"SYNTAX\n" +
" fgit debug [URL<string>] [--help]\n" +
"REMARKS\n" +
Expand Down Expand Up @@ -128,7 +126,7 @@ func main() {
}

isConvertToFastGit := false
isPush := false
isPushOrPull := false

if os.Args[1] == "debug" {
var isConnectOk bool
Expand All @@ -148,13 +146,13 @@ func main() {
}

for i := range os.Args {
if os.Args[i] == "push" {
isPush = true
if os.Args[i] == "push" || os.Args[i] == "pull" {
isPushOrPull = true
break
}
}

if isPush {
if isPushOrPull {
isConvertToFastGit = convertToFastGit()
}

Expand Down

0 comments on commit 1c65f7e

Please sign in to comment.