Skip to content

Commit

Permalink
remove unnedded connection to db
Browse files Browse the repository at this point in the history
  • Loading branch information
abs3ntdev committed Mar 29, 2023
1 parent 0c6f330 commit e2bd03c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -692,9 +692,11 @@ func SnapshotCode(cmd *cobra.Command, args []string) {
}

func PrintConnString(cmd *cobra.Command, args []string) {
ctx := context.Background()
config, conn := loadConfigAndConnectToDB(ctx)
defer conn.Close(ctx)
config, err := LoadConfig()
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}

connstring := config.ConnString
if connstring == "" {
Expand Down

0 comments on commit e2bd03c

Please sign in to comment.