Open setharnold opened 2 years ago
https://github.com/olekukonko/tablewriter/blob/74c60be0ef6886d331ebc3c91b2ac0a7971715b6/util.go#L68
Hello, Coverity flagged this line:
gapLeft := int(math.Ceil(float64(gap / 2)))
as having a mistake -- the gap / 2 is truncated towards zero: https://go.dev/ref/spec#Integer_operators -- thus the math.Ceil() isn't doing anything.
gap / 2
math.Ceil()
Thanks
https://github.com/olekukonko/tablewriter/blob/74c60be0ef6886d331ebc3c91b2ac0a7971715b6/util.go#L68
Hello, Coverity flagged this line:
as having a mistake -- the
gap / 2
is truncated towards zero: https://go.dev/ref/spec#Integer_operators -- thus themath.Ceil()
isn't doing anything.Thanks