forked from mirror/gorm
Replace `ioutil.Discard` with `io.Discard` (#5603)
This commit is contained in:
parent
3f92b9b0df
commit
8c3018b96a
2
go.mod
2
go.mod
|
@ -1,6 +1,6 @@
|
||||||
module gorm.io/gorm
|
module gorm.io/gorm
|
||||||
|
|
||||||
go 1.14
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/jinzhu/inflection v1.0.0
|
github.com/jinzhu/inflection v1.0.0
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
@ -68,8 +68,8 @@ type Interface interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// Discard Discard logger will print any log to ioutil.Discard
|
// Discard Discard logger will print any log to io.Discard
|
||||||
Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), Config{})
|
Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{})
|
||||||
// Default Default logger
|
// Default Default logger
|
||||||
Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
|
Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
|
||||||
SlowThreshold: 200 * time.Millisecond,
|
SlowThreshold: 200 * time.Millisecond,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
module gorm.io/gorm/tests
|
module gorm.io/gorm/tests
|
||||||
|
|
||||||
go 1.14
|
go 1.16
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
|
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
|
||||||
|
|
Loading…
Reference in New Issue