#How to set dependency module constructor params
1 messages · Page 1 of 1 (latest)
Hello! you're asking how module A can pass constructor params to module B when calling it?
yes
example i have a Version module with some versioning logic, and i have a Builder module that needs to call Version functions, they both have similar params like source etc.. from Builder how to set those params for Version module...
When you install another module as a dependency, generated bindings are automatically added to your module.
So from your Builder module you should be able to call dag.Version() or dag.version() (depending on language) with all arguments available in your native language.
i'm using Go, i do call dag.Version() then i have for example dag.Version().source but i can not set any value to it...
can you share the code of your Version constructor?
ok, so my problem was that the constructor was not correct, so now that i fixed it, i am able to pass the params to Version, sorry...
great! no worries at all