parent
7ba58e134d
commit
5a6c837161
|
@ -56,7 +56,6 @@ func (f *File) Connect() error {
|
||||||
var of *os.File
|
var of *os.File
|
||||||
var err error
|
var err error
|
||||||
generatedFile := generateFileName(file)
|
generatedFile := generateFileName(file)
|
||||||
fmt.Printf("writing to output file [%s]", generatedFile)
|
|
||||||
if _, err := os.Stat(generatedFile); os.IsNotExist(err) {
|
if _, err := os.Stat(generatedFile); os.IsNotExist(err) {
|
||||||
// create directory f it doesn't exist
|
// create directory f it doesn't exist
|
||||||
lastSlash := strings.LastIndex(generatedFile, "/")
|
lastSlash := strings.LastIndex(generatedFile, "/")
|
||||||
|
@ -72,7 +71,6 @@ func (f *File) Connect() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Errorf("Failed to initialise file [%s] [%s]", generatedFile, err)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
writers = append(writers, of)
|
writers = append(writers, of)
|
||||||
|
|
Loading…
Reference in New Issue