1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-19 20:57:53 +02:00
Carlos Alexandro Becker 700889269f
fix: no output
In the windows support efforts, accidentally started using testlib in
production code.

`testlib` disables log output on `init`, which was causing the issue.

fixed the usage, and added a panic if `testlib` is used outside of
tests.

closes #5292
2024-11-18 07:53:42 -03:00

16 lines
211 B
Go

package testlib
import (
"io"
"testing"
"github.com/caarlos0/log"
)
func init() {
if !testing.Testing() {
log.Fatal("testlib should not be used in production code!")
}
log.Log = log.New(io.Discard)
}