Skip to content

Commit

Permalink
added ability to switch to a service account as you enter it
Browse files Browse the repository at this point in the history
  • Loading branch information
jay authored and jay committed Mar 7, 2019
1 parent 1a6ff09 commit 452e790
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions peirates.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ func banner(connectionString ServerInfo) {
,,,,,,,,,,,,:.............,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
________________________________________
Peirates v1.0.15 by InGuardians
Peirates v1.0.16 by InGuardians
https://www.inguardians.com/peirates
----------------------------------------------------------------`)

Expand Down Expand Up @@ -1124,7 +1124,21 @@ Peirates:># `)
fmt.Printf("Selected %s // %s\n", connectionString.TokenName, connectionString.Token)
}
case "3":
serviceAccounts = append(serviceAccounts, acceptServiceAccountFromUser())
serviceAccount := acceptServiceAccountFromUser()
serviceAccounts = append(serviceAccounts, serviceAccount)

println("\n[1] Switch to this service account\n[2] Maintain current service account")
fmt.Scanln(&input)
switch input {
case "1":
assignServiceAccountToConnection(serviceAccount, &connectionString)
break
case "2":
break
default:
println("Input not understood - adding service account but not switching context")
}
println("")
case "4":
serviceAccountJSON, err := json.Marshal(serviceAccounts)
if err != nil {
Expand Down

0 comments on commit 452e790

Please sign in to comment.