ExtractWareHouse added.
This commit is contained in:
parent
c90924a4ef
commit
96c90d3f3b
|
|
@ -4,9 +4,11 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"gittea.marcokittel.de/elio/eliotools/tools"
|
||||
)
|
||||
|
||||
type ElioHandleFunc func(filename string, csvfilemap *map[string]string) bool
|
||||
type ElioHandleFunc func(filename string) bool
|
||||
|
||||
type ElioDateiFoo struct {
|
||||
process ElioHandleFunc
|
||||
|
|
@ -20,7 +22,7 @@ func NewElioDateiFoo(dir string, process ElioHandleFunc) *ElioDateiFoo {
|
|||
return &df
|
||||
}
|
||||
|
||||
func (f *ElioDateiFoo) ScanCsv(csvfilemap *map[string]string) {
|
||||
func (f *ElioDateiFoo) ScanCsv() {
|
||||
files, err := os.ReadDir(f.dir)
|
||||
|
||||
if err != nil {
|
||||
|
|
@ -28,8 +30,14 @@ func (f *ElioDateiFoo) ScanCsv(csvfilemap *map[string]string) {
|
|||
}
|
||||
|
||||
for _, file := range files {
|
||||
if strings.Contains(file.Name(), "csv") {
|
||||
f.process(file.Name(), csvfilemap)
|
||||
if !strings.Contains(file.Name(), "csv") {
|
||||
continue
|
||||
}
|
||||
tl, err := tools.ExtractDateAndConvertToDate(file.Name())
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
}
|
||||
// f.process(file.Name())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
module gittea.marcokittel.de/elio/eliotools/eliofile
|
||||
|
||||
go 1.24.4
|
||||
|
||||
require gittea.marcokittel.de/elio/eliotools/tools v0.0.0-20250626201301-c90924a4efa5 // indirect
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
gittea.marcokittel.de/elio/eliotools/tools v0.0.0-20250626201301-c90924a4efa5 h1:A0GZ9Z+IxL/bD9KfGetobuMTh7x+XLzwwAVWuFldHOs=
|
||||
gittea.marcokittel.de/elio/eliotools/tools v0.0.0-20250626201301-c90924a4efa5/go.mod h1:jJvuXliNOiG9i8VXrY9vK5Bqv9QwDtswCs3CNIIBvUQ=
|
||||
Loading…
Reference in New Issue