Removed unnecessary error handling

This commit is contained in:
Zoraiz 2021-05-11 20:00:29 +05:00
parent 165658420b
commit 6559df4f20
1 changed files with 0 additions and 6 deletions

View File

@ -40,17 +40,11 @@ func ConvertToTerminalSizedSlices(img image.Image, dimensions []int) [][]uint32
// Get dimensions of current terminal // Get dimensions of current terminal
if len(dimensions) == 0 { if len(dimensions) == 0 {
var err error
terminalWidth, terminalHeight = consolesize.GetConsoleSize() terminalWidth, terminalHeight = consolesize.GetConsoleSize()
// To avoid cases where empty lines get printed between ascii lines // To avoid cases where empty lines get printed between ascii lines
terminalWidth -= 1 terminalWidth -= 1
terminalHeight -= 1 terminalHeight -= 1
if err != nil {
panic(err)
}
// Fix height // Fix height
var ratio float32 var ratio float32
imgHeight := img.Bounds().Max.Y imgHeight := img.Bounds().Max.Y