Hi! I'm looking to dynamically load and call a module just to understand Dagger's internals a little better.
Something like
package main
import (
"context"
"os"
"dagger.io/dagger"
)
// Intended use: `go run ./ path/to/my/module myFunction`
func main() {
ctx := context.Background()
dag, err := dagger.Connect(ctx)
if err != nil {
panic(err)
}
module := dag.Host().Directory(os.Args[1]).AsModule()
// Load the module.
// Call the function `os.Args[2]` on the module.
}