THIS is the BEST Way to Write HTTP Services in Golang

  Рет қаралды 42,408

Melkey

Melkey

Күн бұрын

Пікірлер: 47
@MelkeyDev
@MelkeyDev 10 ай бұрын
Hope you all enjoy the video - make sure to comment + like and subscribe if you havent already and check out the original article as well!
@NoctuaDeveloppement
@NoctuaDeveloppement 10 ай бұрын
Nice video man, good to have more content to rely on. Thanks and keep up
@MelkeyDev
@MelkeyDev 10 ай бұрын
Thank you. I will always do my best
@pbentesio
@pbentesio 10 ай бұрын
I stumbled into having encode and decode functions because in a project I used protobufs with an optional json fallback. Having all that logic in one place just made sense.
@MelkeyDev
@MelkeyDev 10 ай бұрын
i love when things just make sense. Just gets the BLOOD FLOWING
@RayAndrewsDev
@RayAndrewsDev 10 ай бұрын
Its so nice to see that I'm doing a lot of things the "right" way, but this still has a lot of "OH, that would make things so much easier" patterns. Looks like I'm going to be updating my API template ... again :) Thanks
@MelkeyDev
@MelkeyDev 10 ай бұрын
Hey thank you :)
@lcarv20
@lcarv20 9 ай бұрын
Really cool video, factory for middleware is one thing I have been doing since I learned go.
@cabanford
@cabanford 8 ай бұрын
Like your channel (interested in learning Go). Found you from the Primeagen... Your video cuts remind me of Max Headroom (from 80s MTV) 😂
@MelkeyDev
@MelkeyDev 8 ай бұрын
shout out Primeagen+
@omarcrosby
@omarcrosby 6 ай бұрын
@@MelkeyDev The Primeagen is the best but you're a close second Melkey!
@Cixelsyd32
@Cixelsyd32 10 ай бұрын
Excellent content as always. Hopefully the KZbin gods start showing you the love your channel deserves.
@MelkeyDev
@MelkeyDev 10 ай бұрын
Haha - pray to the algo Gods LOL
@omarcrosby
@omarcrosby 6 ай бұрын
Fantastic article and video covering it!
@whiteshadow7810
@whiteshadow7810 10 ай бұрын
nice video i coming from Javascript world , Thank you for helping keep going
@MelkeyDev
@MelkeyDev 10 ай бұрын
:) no problem. Thank you for the comment
@nikolam-dev
@nikolam-dev 10 ай бұрын
Nice edition, good job
@MelkeyDev
@MelkeyDev 10 ай бұрын
Thank you - hope you enjoy
@dikan34
@dikan34 10 ай бұрын
Best go content on yt ❤
@MelkeyDev
@MelkeyDev 10 ай бұрын
A lot of great people out there make some great Go content but thank you ery much
@ninthsun
@ninthsun 9 ай бұрын
Thanks for introducing awesome post
@gearboxworks
@gearboxworks 10 ай бұрын
I really respect Mat Ryer, and even use his moq code generator, but when I read his article I was disheartened to read him advocating for long parameter lists, at least without mentioning the cons for using them vs. structs. Simply put, when using long parameter lists you have to break the API of a function to add another dependency which has unfortunate ripple effects in terms of breaking code if 3rd parties are using it, and possibly worse, bloating pull requests often making it much harder and time consuming to review. Theo recently had a video about how larger PRs have been shown to significantly reduce velocity, and google says so too in their eng-practices blog (not posting a URL as KZbin seems to hide my comments when I do.) With structs for optional parameters, nothing breaks if you add new properties and code in a backward compatible manner. I really wish Mat and other Gophers would consider the downsides of broken calls and bloated PRs more when they decide to just keep adding parameters to funcs .🤷‍♂️
@MelkeyDev
@MelkeyDev 10 ай бұрын
team structs baby
@TehKarmalizer
@TehKarmalizer 9 ай бұрын
Same. That was my biggest issue. Long parameter lists are so cumbersome and rigid. Otherwise it seemed like good advice to someone who has only dabbled in http handling.
@falasefemi3344
@falasefemi3344 10 ай бұрын
Thanks for this
@MelkeyDev
@MelkeyDev 10 ай бұрын
Youre very welcome
@_us.m.an_
@_us.m.an_ 6 ай бұрын
I suggest read Lets go further book it follows some useful patterns
@internetkite
@internetkite 10 ай бұрын
Thank you 🙏
@MelkeyDev
@MelkeyDev 10 ай бұрын
youre welcome
@MarcosVMSoares
@MarcosVMSoares 7 ай бұрын
Why not using the plug pattern for middleware like in Phoenix? Maybe because wirhout a reduce its impossible??
@MelkeyDev
@MelkeyDev 7 ай бұрын
Im not sure I follow the comment
@JordanBuildz
@JordanBuildz 10 ай бұрын
😂😂😂😂😂 Shoutout to if err != nil had me rolling
@MelkeyDev
@MelkeyDev 10 ай бұрын
BIG shout out
@theyioel
@theyioel 10 ай бұрын
It reminds me of the Flask boilerplates in Python.
@qoobes
@qoobes 8 ай бұрын
Another banger
@MelkeyDev
@MelkeyDev 8 ай бұрын
ANOTHA ONE!!
@ashimov1970
@ashimov1970 8 ай бұрын
Why Chi? Aren't there Go native capabilities to make REST APIs?
@dyto2287
@dyto2287 10 ай бұрын
Encoding response with generics like "encode[T any](..." is stupid. No need to know type inside the func when passing "any" gives the same result.
@MelkeyDev
@MelkeyDev 10 ай бұрын
team interface{} baby haha
@iamwitchergeraltofrivia9670
@iamwitchergeraltofrivia9670 9 ай бұрын
Best way not workung enything on steam
@marius-mihailionte339
@marius-mihailionte339 9 ай бұрын
Do you plan to launch a course or something similar with the code example you shown in the video? Saw the name "goschool" and hope you do something similar like you shown as example, liked very much your course on FrontEnd Masters. Thank you.
The standard library now has all you need for advanced routing in Go.
13:52
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Rob Pike: What Golang Got Right & Wrong
29:23
ThePrimeTime
Рет қаралды 162 М.
SQLc is the perfect tool for those who don't like ORMs
28:11
Dreams of Code
Рет қаралды 120 М.
DIY Golang Web Server: No Dependencies Needed!
25:04
Flo Woelki
Рет қаралды 16 М.
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 89 М.
This is the BEST Golang Context Package Tutorial
12:18
Melkey
Рет қаралды 19 М.
10 Signs Your Software Project Is Heading For FAILURE
17:59
Continuous Delivery
Рет қаралды 44 М.
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 917 М.
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 228 М.
A Beautiful Way To Deal With ERRORS in Golang HTTP Handlers
8:42
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 362 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41