xml params
This commit is contained in:
@@ -2,6 +2,7 @@ package extract
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
type Extractor struct {
|
||||
@@ -10,8 +11,15 @@ type Extractor struct {
|
||||
}
|
||||
|
||||
func NewExtractor(params *Params) *Extractor {
|
||||
os.MkdirAll(params.OutputPath, 0755)
|
||||
os.MkdirAll(params.TempPath, 0755)
|
||||
if err := os.MkdirAll(params.OutputPath, 0755); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := os.MkdirAll(params.TempPath, 0755); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := os.MkdirAll(filepath.Base(params.LogFile), 0755); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return &Extractor{params: params, Clean: true}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user