File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ type metaData struct {
44
44
CompleteTime string
45
45
}
46
46
47
- const version = "0.3.3 "
47
+ const version = "0.3.4 "
48
48
49
49
const headerTmpl = `-- Go SQL Dump {{ .DumpVersion }}
50
50
--
Original file line number Diff line number Diff line change @@ -53,16 +53,16 @@ func Dump(db *sql.DB, out io.Writer) error {
53
53
}
54
54
55
55
// Close the dumper.
56
- // Will also close the database the dumper is connected to as well as the out stream if it is a *os.File .
56
+ // Will also close the database the dumper is connected to as well as the out stream if it has a Close method .
57
57
//
58
58
// Not required.
59
59
func (d * Data ) Close () error {
60
60
defer func () {
61
61
d .Connection = nil
62
62
d .Out = nil
63
63
}()
64
- if file , ok := d .Out .(* os. File ); ok {
65
- file .Close ()
64
+ if out , ok := d .Out .(io. Closer ); ok {
65
+ out .Close ()
66
66
}
67
67
return d .Connection .Close ()
68
68
}
You can’t perform that action at this time.
0 commit comments