Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ioutil.Discard with io.Discard #5603

Merged
merged 1 commit into from Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
@@ -1,6 +1,6 @@
module gorm.io/gorm

go 1.14
go 1.16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


require (
github.com/jinzhu/inflection v1.0.0
Expand Down
6 changes: 3 additions & 3 deletions logger/logger.go
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"os"
"time"
Expand Down Expand Up @@ -68,8 +68,8 @@ type Interface interface {
}

var (
// Discard Discard logger will print any log to ioutil.Discard
Discard = New(log.New(ioutil.Discard, "", log.LstdFlags), Config{})
// Discard Discard logger will print any log to io.Discard
Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{})
// Default Default logger
Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
SlowThreshold: 200 * time.Millisecond,
Expand Down
2 changes: 1 addition & 1 deletion tests/go.mod
@@ -1,6 +1,6 @@
module gorm.io/gorm/tests

go 1.14
go 1.16

require (
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
Expand Down