Make progressBarWidth a const

This commit is contained in:
Christian Muehlhaeuser 2020-08-23 12:09:54 +02:00
parent 339bdd1c85
commit b43f0d52a9
No known key found for this signature in database
GPG Key ID: 3CF9FA45CA1EBB7E
3 changed files with 6 additions and 2 deletions

View File

@ -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),

View File

@ -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

View File

@ -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