v-community / v_by_example

Learn V by Example

Home Page:https://v-community.gitbook.io/v-by-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Including main() in code snippets

Ivo-Balbaert opened this issue · comments

I don’t know if I should make a pull request for this issue:

in many cases in code snippets shown main() is not needed and could be left out, giving a somewhat nicer experience to novel users. On the other hand: in struct.md: the code example with struct User doesn’t run as shown: the code should be in a fn main() {}

I would like to know your opinion on this.
Thanks

Yes... I think the same thing and i agree with this

merged