From c9dda0209235e974a22452cecf6f169f7bcae50d Mon Sep 17 00:00:00 2001 From: Shteryana Shopova Date: Sun, 21 Jul 2019 00:06:50 +0300 Subject: [PATCH] go fmt --- access/fetch-keys/main.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/access/fetch-keys/main.go b/access/fetch-keys/main.go index b3384fe..a7c141a 100644 --- a/access/fetch-keys/main.go +++ b/access/fetch-keys/main.go @@ -38,7 +38,7 @@ func main() { } fi, err := os.Lstat(*keysDir) - if err != nil { + if err != nil { fmt.Println(*keysDir, ": target directory error :", err) os.Exit(1) } else { @@ -56,7 +56,6 @@ func main() { client := github.NewClient(tc) - teamMembers := fetchUsers(client, ghOrganization, ghTeam) for _, user := range teamMembers { if *quiet == false { @@ -95,9 +94,9 @@ func main() { } if *quiet == false { - fmt.Println("Writing to", *keysDir + "/" + *user+".key") + fmt.Println("Writing to", *keysDir+"/"+*user+".key") } - err := ioutil.WriteFile(*keysDir + "/" + *user+".key", sshKeys.Bytes(), 0444) + err := ioutil.WriteFile(*keysDir+"/"+*user+".key", sshKeys.Bytes(), 0444) if err != nil { fmt.Println(*user+".key error ", err) } @@ -132,9 +131,9 @@ func main() { nextPage = rsp.NextPage } if *quiet == false { - fmt.Println("Writing to", *keysDir + "/" + *user+".gpg") + fmt.Println("Writing to", *keysDir+"/"+*user+".gpg") } - err = ioutil.WriteFile(*keysDir + "/" + *user+".gpg", pgpKeys.Bytes(), 0444) + err = ioutil.WriteFile(*keysDir+"/"+*user+".gpg", pgpKeys.Bytes(), 0444) if err != nil { fmt.Println(*user+".gpg error ", err) } @@ -151,7 +150,7 @@ func fetchUsers(client *github.Client, org *string, team *string) (teamMembers [ for nextPage := 0; ; { // list all members for the given organization's team opt := &github.ListMembersOptions{ - PublicOnly: false, + PublicOnly: false, ListOptions: github.ListOptions{nextPage, 50}, } @@ -204,7 +203,7 @@ func fetchUsers(client *github.Client, org *string, team *string) (teamMembers [ } if targetTeam == nil { - fmt.Println(*team , " team not found in ", *org) + fmt.Println(*team, " team not found in ", *org) os.Exit(2) }