#Calling a function of a sub module including opts

1 messages · Page 1 of 1 (latest)

finite solstice
#

How can arguments passed to a function from a sub module?

From https://docs.dagger.io/manuals/developer/dependencies

  return dag.Hello().Hello(ctx)
}

How can the greeting string be passed?

dagger call greeting --greeting=bonjour ignores the greeting.
If I add the greeting string as second param to the Greeting function and then pass it to the hello modules Hello function, I get:

cannot use greeting (variable of type string) as dagger.HelloHelloOpts value in argument to dag.Hello().Hello

When creating a Dagger module, there are two types of dependencies you will encounter: