Skip to content

Commit

Permalink
Add ascii splash
Browse files Browse the repository at this point in the history
  • Loading branch information
harrywm committed Mar 23, 2023
1 parent a42fdb9 commit 0a12486
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
10 changes: 8 additions & 2 deletions cmd/connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"log"

"github.com/birdiecare/dbc/handler"
"github.com/common-nighthawk/go-figure"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -55,11 +56,16 @@ Then paste the token`,
flag.Parse()

if iam {
log.Println("DBConnect IAM")
myFigure := figure.NewFigure("DBC Connect IAM", "", true)
myFigure.Print()
fmt.Println("")

token := handler.GenerateToken(host, port, region, user)
log.Println(fmt.Sprintf("Token: %s", token))
} else {
log.Println("DBConnect")
myFigure := figure.NewFigure("DBC Connect", "", true)
myFigure.Print()
fmt.Println("")
}

if host == "" {
Expand Down
1 change: 0 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/*
Copyright © 2023 Harry M [email protected]
*/
package cmd

Expand Down
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ require (
github.com/spf13/cobra v1.6.1
)

require github.com/gogo/protobuf v1.3.2 // indirect
require (
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/gogo/protobuf v1.3.2 // indirect
)

require (
github.com/aws/aws-sdk-go v1.44.227
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.18.6/go.mod h1:48WJ9l3dwP0GSHWGc5sFG
github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8=
github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA=
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be h1:J5BL2kskAlV9ckgEsNQXscjIaLiOYiZ75d4e94E6dcQ=
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be/go.mod h1:mk5IQ+Y0ZeO87b858TlA645sVcEcbiX6YqP98kt+7+w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down

0 comments on commit 0a12486

Please sign in to comment.