File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package canal
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "io/ioutil "
6
+ "io"
7
7
"os"
8
8
"regexp"
9
9
"strconv"
@@ -165,7 +165,7 @@ func (c *Canal) prepareDumper() error {
165
165
}
166
166
167
167
if c .cfg .Dump .DiscardErr {
168
- c .dumper .SetErrOut (ioutil .Discard )
168
+ c .dumper .SetErrOut (io .Discard )
169
169
} else {
170
170
c .dumper .SetErrOut (os .Stderr )
171
171
}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package canal
2
2
3
3
import (
4
4
"crypto/tls"
5
- "io/ioutil"
6
5
"math/rand"
7
6
"net"
8
7
"os"
@@ -99,7 +98,7 @@ type Config struct {
99
98
}
100
99
101
100
func NewConfigWithFile (name string ) (* Config , error ) {
102
- data , err := ioutil .ReadFile (name )
101
+ data , err := os .ReadFile (name )
103
102
if err != nil {
104
103
return nil , errors .Trace (err )
105
104
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package dump
3
3
import (
4
4
"bytes"
5
5
"fmt"
6
- "io/ioutil "
6
+ "io"
7
7
"os"
8
8
9
9
"github.com/go-mysql-org/go-mysql/client"
@@ -83,19 +83,19 @@ func (s *schemaTestSuite) TestDump(c *C) {
83
83
// Using mysql 5.7 can't work, error:
84
84
// mysqldump: Error 1412: Table definition has changed,
85
85
// please retry transaction when dumping table `test_replication` at row: 0
86
- // err := s.d.Dump(ioutil .Discard)
86
+ // err := s.d.Dump(io .Discard)
87
87
// c.Assert(err, IsNil)
88
88
89
89
s .d .AddDatabases ("test1" , "test2" )
90
90
91
91
s .d .AddIgnoreTables ("test1" , "t2" )
92
92
93
- err := s .d .Dump (ioutil .Discard )
93
+ err := s .d .Dump (io .Discard )
94
94
c .Assert (err , IsNil )
95
95
96
96
s .d .AddTables ("test1" , "t1" )
97
97
98
- err = s .d .Dump (ioutil .Discard )
98
+ err = s .d .Dump (io .Discard )
99
99
c .Assert (err , IsNil )
100
100
}
101
101
You can’t perform that action at this time.
0 commit comments