#How to pass optional args in an interface (go)

1 messages · Page 1 of 1 (latest)

versed plover
#

Hi, I'm wondering, if there exists some documentation about the usage of dagger interfaces besides https://docs.dagger.io/api/interfaces/
My concrete issue is how I can pass an optional argument value:

given: MyModule with the Fooer interface containing a Foo function as in the example.
when: Foo has an optional argument bar bool with // +optional and // +default=false
then: how shall the bar arg be passed?
what I tried so far: dagger.MyModuleFooerFooOpts{Bar: bar} , dagger.FooerFooOpts.. , dagger.FooOpts..

Any help or hint would be greatly appreciated 🙂

The information on this page is only applicable to Go and TypeScript SDKs. Interfaces are not currently supported in the Python SDK.