This was super useful. I know this probably is not best practice but I put everything in sub-packages besides my main.go so I have never experienced this case, but I'm sure this is going to save me from a future headache where I don't get why my project isn't running haha, thanks!
It also does not work with workspaces. There are also cases where you have to change into the module folder to work correctly. (Not sure which, I forgot but I am always annoyed by this.)
I've just started with go like last week, haven't written much. But I've been tired of writing go run main.go. or tabing up in the terminal for that command. I just wanna configure VS Code to run the active file window when I press f5. I just gotta figure out how those VS Code configuations things work
@@boldlygo Sorry my mistake. It's `go run ./*` that breaks if there are non-go files or *_test.go files. But I forgot why I was using * in the first place. I probably shouldn't do that. `go run .` without the asterisk works fine
This was super useful. I know this probably is not best practice but I put everything in sub-packages besides my main.go so I have never experienced this case, but I'm sure this is going to save me from a future headache where I don't get why my project isn't running haha, thanks!
Keeping things organized in packages is actually a really good idea.
Thank you for this very useful video!
Great vid. I tend to skip a fair amount of important details and this one for me was like "Whoa"
I've been relearning Go, helpful insight as I'm familiarizing myself with best practices around packaging / modules
This was really informative and concise! Thanks :)
It also does not work with workspaces. There are also cases where you have to change into the module folder to work correctly. (Not sure which, I forgot but I am always annoyed by this.)
I've just started with go like last week, haven't written much. But I've been tired of writing go run main.go. or tabing up in the terminal for that command. I just wanna configure VS Code to run the active file window when I press f5. I just gotta figure out how those VS Code configuations things work
Hi, can you review book "go cookbook" by Sau Sheong Chang?!
I do what I want.
You're not my mom!
No dessert for you! 😂
You already did alot of effort explaining what are the no-effort videos, next just go on with the content and the awkwardness 😂
Fair point. But not everyone watches every video. So I like a brief explainer for anyone who jumps into the middle of the series.
@@boldlygo fair, but just indulge us who follow your antics already heheh
I was expecting something about how go run . breaks if you have test files in the package
Can you elaborate on what you mean?
@@boldlygo
Sorry my mistake.
It's `go run ./*` that breaks if there are non-go files or *_test.go files.
But I forgot why I was using * in the first place. I probably shouldn't do that.
`go run .` without the asterisk works fine
Ah yes. * in a go run path can cause all kinds of chaos!