I'm tried to use the Go SDK on a small go project but it seems I cannot access my host from an entrypoint function.
package main
import (
"dagger.io/dagger"
"strings"
)
func main() {
dagger.ServeCommands(Build)
}
func Build(ctx dagger.Context) (string, error) {
files, err := ctx.Client().Host().Directory(".").Entries(ctx)
return strings.Join(files, ","), err
}
dagger do -c ./ci build
# ... logs
█◀┴─┴─╯ █ ERROR [build]
┃ ┃ input:1: host.directory.entries error from sender: context canceled
Is it me doing something wrong or this capabilities isn't supported for now?