Following the docs, it seems that the idiomatic way to write a Go script with Dagger is via dagger init, which generates some code in the internal folder.
But I also saw many examples of people who wrote ordinary go CLI applications, including dagger as a library.
In the latter case, the script contains a main. In the former case, the scripts becomes a collection of functions to be invoked via dagger call.
I am not sure if both ways are valid options, in which case I should prefer one over the other. I could not find info about that.
As a newbie this would help me investing in the right direction.