What is the correct way to create and pass an array to dagger via the dagger cli?
I have a base function called test that I'd like to be able to pass an array of commands to run (lint, md, unit, etc) but I can't seem to figure out how to actually format my dagger call command to have it read whatever I send as an array
func (m *MyMod) Test(
...
operations []string,
...
) []string {
for _, operation := range operations {
result := m.BaseImage(
ctx,
plugin,
dependencies,
phpVersion,
appVersion,
database,
).
WithExec([]string{"../ci/bin/app-plugin-ci", operation}).Stdout(ctx)
results = append(results, result)
}
return results
}
This is the command I was trying to run however this just causes the dagger cli to segfault
dagger call test --plugin="$PLUGIN_PATH" --dependencies="$DEP_PATH" --operations="phplint","phpmd" -v
# OUTPUT
Stderr:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x950d37]
...
I'm new to both dagger and go so I could just be missing something (sorry)
I assumed that dagger could accept an array of strings on the command line as an argument since it didn't explicitly complain when I set it however I wasn't able to find anything on the arguments page https://docs.dagger.io/manuals/user/249202/arguments about passing an array so maybe I'm off base here and should reorganize everything to match the pattern dagger expects?
Thank you very much for your time