Closed joehil closed 5 years ago
Hi @joehil , sorry for late answer. Could you please describe your use-case?
From what I see, you want to use slice instead of list of arguments. Please consider following example how you can do that without PR:
package main
import (
"fmt"
)
func FileWatcher(mask int, files ...string) {
fmt.Println("mask:", mask)
for _, x := range files {
fmt.Println(x)
}
}
func main() {
FileWatcher(1, "A", "B", "C")
slice := []string{}
slice = append(slice, "X")
slice = append(slice, "Y")
slice = append(slice, "Z")
FileWatcher(2, slice...)
}
I really like your project gonotify!! Unfortunately I needed a new function NewFileWatcherSlice that I incorporated in my fork.
Would you like reviewing it and adding it to your project?
Thank you very much!
With kindest regards Joehil