#Use external type from dependency module

1 messages · Page 1 of 1 (latest)

fallow ledge
#

I’m installing an external module from Daggerverse. However, when I run an example module in Go code, it returns the error ‘cannot return external type from dependency module’. Do I need to do anything specific to use an external type from a dependency module?

This is the example module that I am using:

func (m *Test) Example(repository string) *DockerImage {
        return dag.
                Docker().
                Cli().
                Pull(repository)
}
ruby onyx
#

As far as I know, you cannot return an external type from a dependency.

As a workaround, you can try store it as a field in a structure and return this struct, this might work 😉

fallow ledge
#

So, I have to create a structure with the same fields as in the dependency module, am I right?