Eliofile: Added HandleFunc
This commit is contained in:
parent
9b699695e6
commit
6475655ba7
|
|
@ -1,22 +1,21 @@
|
|||
package eliofile
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ElioHandleFunc func(filename string)
|
||||
|
||||
type ElioDateiFoo struct {
|
||||
process func(file string)
|
||||
process ElioHandleFunc
|
||||
dir string
|
||||
}
|
||||
|
||||
func NewElioDateiFoo(dir string) *ElioDateiFoo {
|
||||
func NewElioDateiFoo(dir string, process ElioHandleFunc) *ElioDateiFoo {
|
||||
df := ElioDateiFoo{dir: dir,
|
||||
process: func(file string) {
|
||||
fmt.Println(file)
|
||||
},
|
||||
process: process,
|
||||
}
|
||||
return &df
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue