brave-intl / bat-go

Pass "go", collect 200 BAT
Mozilla Public License 2.0
41 stars 31 forks source link

Replace uses of `log.Fatal` with `log.Panic` #2564

Open Sneagan opened 3 weeks ago

Sneagan commented 3 weeks ago
          I don't like this `Fatal` here at all (because nothing deferred will happen). But there are already quite a few others.

Technically, this is incorrect. The opened file won't be properly closed. If you want to terminate without too much hassle in this closure, better use log.Panic instead.

_Originally posted by @pavelbrm in https://github.com/brave-intl/bat-go/pull/2544#discussion_r1637571400_