4 ms·
Isn't "color.Unset()" dead code? if err != nil { color.Set(color.FgRed, color.BlinkSlow) log.Fatal(err) color.Unset() } https://github.com/dlio
by junke 10y ago
Isn't "color.Unset()" dead code?
if err != nil {
color.Set(color.FgRed, color.BlinkSlow)
log.Fatal(err)
color.Unset()
}
https://github.com/dlion/go-odbye/blob/master/main.go#L27 https://github.com/dlion/go-odbye/blob/master/main.go#L27
- deleted 10y ago[deleted]
- deleted 10y ago[deleted]
- 0xmohit 10y agoEven lines such as var plus int64 plus = 0 could be written as plus := 0 -- The following if *url == true should be written as if *url -- Moreover, custom logger could be implemented to avoid code repetition.
- DLion 10y agoI obviously knew that but I did it to be sure to do the right things and to write a more understanding code. I will edit it very soon, thanks!
- DLion 10y agoYou are right, on the start I used Printf instead of Fatal and after the change I forget to remove it, thanks!