Eliofile Lister 2

This commit is contained in:
Marco Kittel 2025-06-25 23:18:21 +02:00
parent e36a0cd13f
commit d801fbca0b
1 changed files with 4 additions and 8 deletions

View File

@ -9,10 +9,11 @@ import (
type ElioDateiFoo struct { type ElioDateiFoo struct {
process func(file string) process func(file string)
dir string
} }
func NewElioDateiFoo() *ElioDateiFoo { func NewElioDateiFoo(dir string) *ElioDateiFoo {
df := ElioDateiFoo{ df := ElioDateiFoo{dir: dir,
process: func(file string) { process: func(file string) {
fmt.Println(file) fmt.Println(file)
}, },
@ -20,7 +21,7 @@ func NewElioDateiFoo() *ElioDateiFoo {
return &df return &df
} }
func (f *ElioDateiFoo) scanCsv() { func (f *ElioDateiFoo) ScanCsv() {
files, err := os.ReadDir(".") files, err := os.ReadDir(".")
if err != nil { if err != nil {
@ -33,8 +34,3 @@ func (f *ElioDateiFoo) scanCsv() {
} }
} }
} }
func main() {
df := NewElioDateiFoo()
df.scanCsv()
}