This is pretty cool. I'm writing a Go API. I'm using comments to document the API. The comments let me generate a Swagger file. The Swagger file let's me generate a /docs website. The Swagger file also let's me generate a Go client for the API. The Go Client for the API can be used to test the API itself. Wow.
@sbobadilla3 жыл бұрын
long long time after this was posted, but I just have to say that this whole series is truly amazing, and I am absolutely baffled at how you managed to debug the whole thing. When the test passed I literally opened my eyes wide and stared in amazement. And you do make it seem easy, you are a fantastic teacher, and it really shows that you are knowledgeable in the topic you are covering. Thank you for making this series.
@IvanZupancic4 жыл бұрын
I for one really liked the video. I saw Nic suffer a bit :) On a serious note it is nice to see it's not just re-purposed re-hashed scripted content.
@NicJackson4 жыл бұрын
Well debugging that was interesting. I was literally learning all of that as I went, I hope you also find the approach of debugging useful and the thought process I go through as I do this. Debugging is one of the most difficult parts of writing code, much is trial error and intuition. But step debugging in tools like VSCode really help to take the guesswork out.
@dimayasnohurskyi28054 жыл бұрын
Yup, it's was interesting)
@ramana17292 жыл бұрын
Hi Nic - great job - just enjoyed every bit - yes debugging is a pain but can relate to it. Thanks.
@ramana17292 жыл бұрын
That was great Nic. Very impressed.
@preferablyoutside3 жыл бұрын
can't overstate just how helpful it was to watch your debugging process - cheers :)
@craigstroberg41363 жыл бұрын
Thank you for adding this video it was informative on how you approached debugging the issue.
@jared6117 Жыл бұрын
learned quite a few useful things about the debugger
@kobe248ryant3 жыл бұрын
Nice video Nic, unlike most other scripted videos, it shows how you approach the problem and solve it with humanity.
@cortofior Жыл бұрын
Thanks Nic, these videos teach me a lot!
@mohammedbadusha53533 жыл бұрын
Hi Nic, I have query regarding how to compile on Makefile on windows . Reason is installed VScode in windows box. Please suggest me,
@khwarzme2 жыл бұрын
Are you not using WSL2? There was a video by Nic (not sure if it's part of this playlist or not) in which Nic is setting up his environment for development on windows using WSL
@WrongOrNot4 жыл бұрын
Great Job :) Thanks for your work! Any chance that you show how you would implement the generated go server-stub? I am trying Swagger right now designed an API and generated the stub. Now im wondering how i can implement that to business logic without modifiing the stub files. I do not want to modify stub files because i think then it is not updateable anymore if the API changes
@szucik10213 жыл бұрын
Wen will the next episode / series?
@abdorootuae Жыл бұрын
thank you so much for the useful content
@superchorizo28604 жыл бұрын
Does anybody use Swagger Codegen in real projects? Code generation is kind of a broken promise, and I always end up implementing rest clients myself.
@NicJackson4 жыл бұрын
Personally I am not a fan, I find the structure of the generated code quite cumbersome to work with. Having said that with gRPC I would happily use the generated clients. I think the key is a that this is possible. Some folks will be quite happy to use an autogenerated client and if you document with Swagger it is pretty trivial for them to do this.
@siddhantsharma51254 жыл бұрын
@@NicJackson does the quality of documentation that we do end up effecting the generated code?
@eamarc4 жыл бұрын
I used both generated client: from go-swagger and from swagger editor service, but it was painful. However this clients helps me to find some errors in main code.
@titusdishon51094 жыл бұрын
Hey @Nic , I got this error - path param "id" is not present in path "/products" - path param "{id}" has no parameter definition any idea what could be the reason
@NicJackson4 жыл бұрын
Hey Titus, was this during generation of the client code?
@titusdishon51094 жыл бұрын
@@NicJackson yes, I think it has something to do with the swagger. yaml file
@danchenganga41582 жыл бұрын
@@titusdishon5109 latter on in this tutorial we have solved the error by defining the Id in the docs generation
@JoeWaldner4 жыл бұрын
i cannot seem to get put and post to work. I even got the code from git. Seems like it does not even hit the breakpoints :-(
@NicJackson3 жыл бұрын
Joseph is it possible for you to share your code pls, more than happy to look.
@sovrinfo Жыл бұрын
Awesome, Big Thanks!
@ultiumlabs48993 жыл бұрын
love this series. keep going Nic. debugging is important part of programmer's life.. but I just feel get lost following the code, because it seems like you add file, add code & moving the code behind the scene, did I watch by wrong order? I'm watching based on the number Go:7, Go:8, and so on
@khwarzme2 жыл бұрын
You did not watch the wrong order. Nic does do changes between series especially when the work is tedious and redundant. I tried to follow up by coding along with him but now i'm using his repo, and I checkout to the series I watch. This makes much more sense and makes my mental effort focused on understanding what he's doing rather than trying to keep up with writing the code
@jsonkody4 жыл бұрын
Ooo .. new mic .. rode podmic :D
@cizma27 Жыл бұрын
At around 25:00 it was really painful to watch xD
@AbegazNap11 ай бұрын
nice bit of debugging
@pakpresopus4 жыл бұрын
change the title to "debugging in go" , i got more of a debugging lesson hahaha
@NicJackson4 жыл бұрын
This is also kind of the point, nobody writes perfect code and defining is a skill in itself so i try to show that part of the process rather than editing out
@pakpresopus4 жыл бұрын
@@NicJackson oh wow nic himself i like ur lesson nic , is there any plan to make a tutorial on how to implement a database such as mongodb in go?
@NicJackson4 жыл бұрын
@@pakpresopus yes, id like to do that. Time is really tough at the moment
@ramiroandresvidela65923 жыл бұрын
Huff that's a real pain!. I Unless we where talking about a really big service, I think is not worth the extra pain to generate this over structure code. Just keep it simple, Create a simple http client, add some of the basic params that you may need and that's all. That is way too much code for too little services. Not for me. I'll stick with the old fashon way. Do it yourself
@kemalkaraduman41082 жыл бұрын
Thank you so much broooooooooo!
@developmentapp Жыл бұрын
Is it cold at your house? Why are you wearing a hat?
@NicJackson Жыл бұрын
In winter yes. I could heat the whole house just to heat one small room, but that is not really very good for the environment. Thanks for too concern tho