Hey Alexys, you're totally right. I forgot one really important bit, here's the fix: github.com/MarioCarrion/videos/blob/main/2022/06/10/main.go#L29 This happens because in the goroutine we were referring to always the same "svc" therefore it gives us some random value; however if a new variable is created the scope changes and it refers to each value as expected. It's a common gotcha when dealing with goroutines and loops.
@@Alexyslozada The for-loop spins around faster than the Go-routines are spawned and will always call the last function which returns 3. The fix is to introduce a local variable in the body of the for-loop which is assigned for every iteration.
Thanks for the video, I saw a direct example of synchronous calls. Since most api calls are asynchronous, is the orchestrator the synchronizing only other service calls?
Thanks for watching. The calls in the example code are asynchronous using goroutines, what the orchestrator is doing in this case is synchronizing the results to add them all.
Love your content. Can you please make a full course? just a single course on Udemy or even a personal website. Full courses on go and microservices. and others go topic. We need one full course for each great topic. here it seems like there are many of information but not properly ordered. Please we need a full course for each great topic.
Hello! Yes, I recently recorded a video that covers my new setup: ruclips.net/video/LbsILONOaiE/видео.html the code is here: github.com/MarioCarrion/videos/tree/269956e913b76e6bb4ed790e4b5d25255cb1db4f/2023/01/nvim
Great video! Really curious what LSP plugins you are using in your vim config. I use CoC right now but it doesn't look as fancy with your type definitions and icons. Do you have a vimrc or init.vim you could share?
Hey Jack, yes I do: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f For the fancy type definitions and icon I had to migrate from vimconfig to LUA, I have a blog post covering more specifics: mariocarrion.com/2022/03/26/neovim-lua-init.html I'm planning to create a new video covering/describing that configuration in the near future. Cheers!
Hi, great lesson, thank you so much, one question about the vi Editor, the Go syntax checker is very great I like it, can you please share the link for it please :))
Hi Mario thanks for sharing you knowledge, we really appreciate the effort, keep it up man. I was wondering if you can list opensource projects (small or medium projects) that can be used as example regarding the golang software architecture and best practices? thanks in advance
Hello! Thanks for the comment, I appreciate it. My biased recommendation would be my own repo 😀 github.com/MarioCarrion/todo-api-microservice-example, heh, other than I think the closest thing to a *real life* example is github.com/google/exposure-notifications-server I hope that helps, cheers.
Hi Mario, thanks for the video. It seems the total is returning 9 and that is wrong. Or I missed something?
Hey Alexys, you're totally right. I forgot one really important bit, here's the fix: github.com/MarioCarrion/videos/blob/main/2022/06/10/main.go#L29
This happens because in the goroutine we were referring to always the same "svc" therefore it gives us some random value; however if a new variable is created the scope changes and it refers to each value as expected. It's a common gotcha when dealing with goroutines and loops.
@@MarioCarrion ah yeah! The variable is always the last one. Cool thanks
@@Alexyslozada The for-loop spins around faster than the Go-routines are spawned and will always call the last function which returns 3. The fix is to introduce a local variable in the body of the for-loop which is assigned for every iteration.
Simple but effective example! Thanks for sharing!
I really appreciate the effort that goes into these videos, many thanks!
Thanks Osama, take care.
Ohh errGroup!!! I didn't know that this exist in golang😮, btw thanks marrio sir this video was so informative for me❤️
Thanks for watching Take care!
Great videos, this channel deserves more subscribers.
I appreciate that Vasilis, stay safe.
Thank you, nice video! And thank you for fixing your vim/neovim's signcolumn to prevent the text (code) from jumping around as you were typing
Thanks Farzard, I think after the migration to LUA some things got fixed as a side effect. Best!
Thanks for the video, I saw a direct example of synchronous calls. Since most api calls are asynchronous, is the orchestrator the synchronizing only other service calls?
Thanks for watching. The calls in the example code are asynchronous using goroutines, what the orchestrator is doing in this case is synchronizing the results to add them all.
😎👌
Love your content. Can you please make a full course? just a single course on Udemy or even a personal website. Full courses on go and microservices. and others go topic. We need one full course for each great topic. here it seems like there are many of information but not properly ordered. Please we need a full course for each great topic.
I'm working on a course, it's taking me a bit but hopefully this year. Thanks for the support. Take care.
@@MarioCarrion Please We can't wait for it. Wish you all the great energy to get it done before the end of the year.
hi Mario! Could you please share your vim setup? it looks so cool!
Hello! Yes, I recently recorded a video that covers my new setup: ruclips.net/video/LbsILONOaiE/видео.html the code is here: github.com/MarioCarrion/videos/tree/269956e913b76e6bb4ed790e4b5d25255cb1db4f/2023/01/nvim
@@MarioCarrion great!! :)
Great video! Really curious what LSP plugins you are using in your vim config. I use CoC right now but it doesn't look as fancy with your type definitions and icons. Do you have a vimrc or init.vim you could share?
Hey Jack, yes I do: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f
For the fancy type definitions and icon I had to migrate from vimconfig to LUA, I have a blog post covering more specifics: mariocarrion.com/2022/03/26/neovim-lua-init.html
I'm planning to create a new video covering/describing that configuration in the near future.
Cheers!
Hi, great lesson, thank you so much, one question about the vi Editor, the Go syntax checker is very great I like it, can you please share the link for it please :))
Hello! I'm using neovim, the syntax checker comes from gopls+vim-go, here's my init.lua: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f
Hi. Totally off topic. VIM colorscheme looks lit. Can I know the name?
Hello! I'm using "PaperColor", here's the LUA config if you're interested: gist.github.com/MarioCarrion/06346c6ec6d26e10d94627d90d78733f
Cheers!
Hi Mario thanks for sharing you knowledge, we really appreciate the effort, keep it up man.
I was wondering if you can list opensource projects (small or medium projects) that can be used as example regarding the golang software architecture and best practices? thanks in advance
Hello! Thanks for the comment, I appreciate it.
My biased recommendation would be my own repo 😀 github.com/MarioCarrion/todo-api-microservice-example, heh, other than I think the closest thing to a *real life* example is github.com/google/exposure-notifications-server
I hope that helps, cheers.
thanks
Thanks for watching! Cheers