Skip to content

Commit

Permalink
style(progressbar): Make full width
Browse files Browse the repository at this point in the history
This makes the progress bar full width and combines the two finished printed strings into one Printf call.
  • Loading branch information
gwenwindflower committed Apr 18, 2024
1 parent a6cdfa3 commit 219dc74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,5 @@ func main() {
log.Fatalf("Error writing files: %v\n", err)
}
e.ProcessingElapsed = time.Since(e.ProcessingStart).Seconds()
fmt.Printf("\n🏁 Done in %.1fs fetching data and %.1fs writing files! ", e.DbElapsed, e.ProcessingElapsed)
fmt.Printf("\nYour YAML and SQL files are in the %s directory.", formResponse.BuildDir)
fmt.Printf("\n🏁 Done in %.1fs fetching data and %.1fs writing files!\nYour YAML and SQL files are in the %s directory.", e.DbElapsed, e.ProcessingElapsed, formResponse.BuildDir)
}
4 changes: 2 additions & 2 deletions sourcerer/put_columns_on_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ func PutColumnsOnTables(ctx context.Context, ts shared.SourceTables, dbc DbConn)
mutex := sync.Mutex{}

bar := progressbar.NewOptions(len(ts.SourceTables),
progressbar.OptionSetWidth(5),
progressbar.OptionShowCount(),
progressbar.OptionShowElapsedTimeOnFinish(),
progressbar.OptionFullWidth(),
progressbar.OptionEnableColorCodes(true),
progressbar.OptionSetDescription("[magenta]🏎️✨ Getting warehouse metadata...[reset]"),
progressbar.OptionSetDescription("🏎️✨"),
)
var wg sync.WaitGroup
wg.Add(len(ts.SourceTables))
Expand Down

0 comments on commit 219dc74

Please sign in to comment.