v0.6.3: BUGFIX: Append to current.godit so we do not block when file already exist
This commit is contained in:
parent
3e4cdd6f35
commit
10201023f0
4
main.go
4
main.go
@ -36,7 +36,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
version = "0.6.2"
|
version = "0.6.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -54,7 +54,7 @@ func NewWriter(file string) (*bufio.Writer, *os.File, error) {
|
|||||||
var f *os.File
|
var f *os.File
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
f, err = os.OpenFile(file, os.O_CREATE|os.O_WRONLY, 0640)
|
f, err = os.OpenFile(file, os.O_CREATE|os.O_RDWR|os.O_APPEND, 0640)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user