#things printed to stdout by a method are
1 messages · Page 1 of 1 (latest)
specifically things fmt.Println and the like
Example ...
$ dagger call go-test
▶ connect 0.2s
▶ load module: . 7.2s
● parsing command line arguments 0.0s
● eventSchemas(
┆ src: Host.directory(path: "/Users/emuller/devel/xyz/foo-bar", exclude: [], noCache: true): Directory!
): ThingThing! 0.2s
▶ .goTest: Void 12.7s
goTest there has output that I want to see (but not return) ...
I guess I could return it though
The problem with outputting it is that it then makes it hard to reuse the same method in a chain ... but I guess it could be wrapped
This is something I run into constantly too. I sometimes end up passing -v to the dagger CLI when I want to see the results. Most of the time, I don't care about the actual report when I run locally. I care about it when it fails, but dagger then prints the error.
You could also have the function return a custom struct and attach additional methods for printing reports etc. This module has a good example - https://github.com/dagger/dagger/blob/main/modules/golangci/lint.go#L191.
I do wish there was a better way to tell dagger what I want to see in the TUI and not. I am hopeful the work Alex is doing here will help with that - https://github.com/dagger/dagger/pull/9327