Комментарии:
GO CONTENT IS AWESOME!
I HOPE YOU ALL ENJOY IT.
MAKE SURE TO COMMENT AND SUBSCRIBE- it really means the world <3
😅 I need to learn Go. I think Backend dev is adding Go to their courses.
ОтветитьCan you explain why you prefer to keep tests in a separate folder instead of next to the files they are intended to test? Just curious.
ОтветитьAckshually, on Linux theyr'e called directories not folders
ОтветитьWhat if we create a cmd/main.go instead of nesting it within another folder?
ОтветитьDo we gitignore the bin directory? Considering that the contains the output build, we wouldn’t wanna track that in version control right?
ОтветитьI charge like 50% extra amount when I have to work on a project with this structure.
Ответитьwhoa 10k subs already, way to go
ОтветитьAmazing content !
Maybe it's a useless question but is it better to use Gin or Go the hard way to build a full Rest API ?
Hey what about the embed package? I don't think it's possible to embed static files outside of cmd directory or handlers.
ОтветитьThe biggest annoyance for me has been maintaining go versions and updates. Theres no inbuilt go update latest. you have to know the latest version number and manually manage that, then manually manage env vars which is also gross, I shouldn't have to be touching that imo.
Ответитьhow do i use code from inside my INTERNAL folder in another folder in INTERNAL folder.. like i have some funcs that do some basic shit and i wanna use them to make it easier instead of writing their implementations out every time
Ответитьi work in go but the second I see "go is awesome" I'm out :D
ОтветитьWait what, do you actually test??? Lol
Ok in a serious note, you should make a video on go testing
When I create go project. I always follow MVC like PHP framework folders.
- routes -> routes.go
- models -> post.go
- databases -> database.go
- controllers -> post_controllers.go, etc
- views ->
- layouts -> layout.html
- pages -> home.html, about,html, etc
- middlewares -> auth.go
main.go
go.mod
I dont know its good or bad. But it make easier for me to trace something and so familiar with other projects with different languages.
wow, happy see some nice educative golang content. i would love yo see some real world api project with best practices. Just like you would do for some clinet
ОтветитьPersonally I don’t like having a test directory, the tests should be near the source code with a _test name
ОтветитьThank you so much. For last few years I was programming in ruby using rails framework where layout is defined by framework and I was really struggling with figuring out what layout to use.
Ответитьnice,,, but, plz proceed with more hands on.... then it would be better for the audience. Ty
Ответитьjust started on go recently and struggling with structuring my project. watched a couple videos on that but seems like opinions are quite contradicting. anyway, great walkthrough, helps a lot
Ответить