mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
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
16 lines
211 B
Go
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)
|
|
}
|