Eliofile: Added HandleFunc
This commit is contained in:
parent
9b699695e6
commit
6475655ba7
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue