Eliofile: Added HandleFunc

This commit is contained in:
Marco Kittel 2025-06-26 06:57:21 +02:00
parent 9b699695e6
commit 6475655ba7
1 changed files with 5 additions and 6 deletions

View File

@ -1,22 +1,21 @@
package eliofile package eliofile
import ( import (
"fmt"
"log" "log"
"os" "os"
"strings" "strings"
) )
type ElioHandleFunc func(filename string)
type ElioDateiFoo struct { type ElioDateiFoo struct {
process func(file string) process ElioHandleFunc
dir string dir string
} }
func NewElioDateiFoo(dir string) *ElioDateiFoo { func NewElioDateiFoo(dir string, process ElioHandleFunc) *ElioDateiFoo {
df := ElioDateiFoo{dir: dir, df := ElioDateiFoo{dir: dir,
process: func(file string) { process: process,
fmt.Println(file)
},
} }
return &df return &df
} }