xml report

This commit is contained in:
nuknal
2024-05-22 11:31:08 +08:00
parent 0634b0106e
commit eb6e0bc95a
6 changed files with 93 additions and 8 deletions

View File

@@ -3,11 +3,15 @@ package extract
import (
"os"
"path/filepath"
"sync"
)
type Extractor struct {
params *Params
Clean bool
mutex sync.RWMutex
report *Report
}
func NewExtractor(params *Params) *Extractor {
@@ -20,7 +24,7 @@ func NewExtractor(params *Params) *Extractor {
if err := os.MkdirAll(filepath.Base(params.LogFile), 0755); err != nil {
panic(err)
}
return &Extractor{params: params, Clean: true}
return &Extractor{params: params, Clean: true, report: &Report{SegmentDirRoot: params.OutputPath}}
}
func (e *Extractor) Cleanup() error {