golangci-lint/pkg/logutils/logutils.go
2018-06-08 08:43:43 +03:00

18 lines
279 B
Go

package logutils
import (
"os"
"github.com/sirupsen/logrus"
)
var isGolangCIRun = os.Getenv("GOLANGCI_COM_RUN") == "1"
func HiddenWarnf(format string, args ...interface{}) {
if isGolangCIRun {
logrus.Warnf(format, args...)
} else {
logrus.Infof(format, args...)
}
}