Skip to content

Commit

Permalink
Make progressBarWidth a const
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Aug 23, 2020
1 parent 339bdd1 commit b43f0d5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions main.go
Expand Up @@ -24,6 +24,10 @@ var (
}
)

const (
progressBarWidth = 40
)

func registerApp(config *Config) (string, error) {
app, err := mastodon.RegisterApp(context.Background(), &mastodon.AppConfig{
Server: config.Value("instance").(string),
Expand Down
2 changes: 1 addition & 1 deletion search.go
Expand Up @@ -33,7 +33,7 @@ func search(token string) error {
return fmt.Sprintf("%d of %d", p.Current, int64(math.Max(float64(p.Current), float64(self.StatusesCount))))
},
Current: 0,
Width: 40,
Width: progressBarWidth,
}

var pg mastodon.Pagination
Expand Down
2 changes: 1 addition & 1 deletion stats.go
Expand Up @@ -77,7 +77,7 @@ func gatherStats() error {
return fmt.Sprintf("%d of %d", p.Current, int64(math.Max(float64(p.Current), float64(self.StatusesCount))))
},
Current: 0,
Width: 40,
Width: progressBarWidth,
}

var pg mastodon.Pagination
Expand Down

0 comments on commit b43f0d5

Please sign in to comment.