3 ms·
> I love the idea of main-less Go scripts for times where you just want to do something simple, fast. What do you mean by a main-less script? And what would be
by dgellow 6y ago
> I love the idea of main-less Go scripts for times where you just want to do something simple, fast.
What do you mean by a main-less script? And what would be "simple and fast" about it? If I want to try out something fast, I just do everything in a main.go and run it with "go run main.go", and that works well as a scripting language.
- uryga 6y ago> What do you mean by a main-less script? probably something that's common in "scripting" languages, where you don't have to wrap your code in main(), it just executes from the top: myscript.py ----------- print('hi') vs myscript.go ----------- func main() { fmt.PrintLn('hi') }