mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 12:22:34 +03:00
Enable intrange linter, and fix warnings
This commit is contained in:
@ -180,7 +180,7 @@ func (self *FilesController) Explode(v *gocui.View, onDone func()) {
|
||||
|
||||
self.c.OnWorker(func(_ gocui.Task) error {
|
||||
max := 25
|
||||
for i := 0; i < max; i++ {
|
||||
for i := range max {
|
||||
image := getExplodeImage(width, height, i, max)
|
||||
style := styles[(i*len(styles)/max)%len(styles)]
|
||||
coloredImage := style.Sprint(image)
|
||||
@ -229,8 +229,8 @@ func getExplodeImage(width int, height int, frame int, max int) string {
|
||||
innerRadius = (progress - 0.5) * 2 * maxRadius
|
||||
}
|
||||
|
||||
for y := 0; y < height; y++ {
|
||||
for x := 0; x < width; x++ {
|
||||
for y := range height {
|
||||
for x := range width {
|
||||
// calculate distance from center, scale x by 2 to compensate for character aspect ratio
|
||||
distance := math.Hypot(float64(x-centerX), float64(y-centerY)*2)
|
||||
|
||||
|
Reference in New Issue
Block a user