I need to process several files - each file going through an inner loop.
I know I can pass in a single file at a time like:
dagger -c "process file1.txt"
dagger -c "process file2.txt"
# ...
dagger -c "process fileN.txt"
Instead, I want to do something like: dagger -c "outer-loop file1.txt, file2.txt, ..., fileN.txt"
func (h *Headway) OuterLoop(ctx context.Context, files ...*dagger.File) (*dagger.Directory, error) { ... }
# also tried this, envoked with `dagger -c "outer-loop [file1.txt, file2.txt, ..., fileN.txt]"`
func (h *Headway) OuterLoop(ctx context.Context, files []*dagger.File) (*dagger.Directory, error) { ... }
But both give me an error like:
Error: function "outer-loop": accepts at most 1 positional argument(s), received 3
Other than invoking dagger -c once for each input file, I suppose I could move all the files into a subdir and pass that subdir in as the single argument, but is it possible to do something more like my original attempt?