THIS is the BEST Way to Write HTTP Services in Golang

Поділитися
Вставка
  • Опубліковано 11 чер 2024
  • Go is an incredibly good programming language. It is gaining in popularity and is increasingly being used in fields such as cloud computing, backend and infrastructure.
    In this video I go through an article written by Mat Ryer, an engineer at Grafana on how to write HTTP services in Go.
    Link to article:
    grafana.com/blog/2024/02/09/h...
    Code: github.com/Melkeydev/go-bluep...
    Video Editor: @TheMason
    Twitch
    I stream live on Twitch every weekend
    Twitch : / melkey
    Join the amazing community on Discord
    Discord: / discord
    I post memes and host Twitter Tech Spaces
    Twitter: / melkeydev
    Whether you're a beginner or a seasoned developer, our step-by-step approach will unveil the secrets behind creating high-performance, scalable HTTP services that stand out. Dive into the world of Go with practical examples, best practices, and expert tips to elevate your programming skills to the next level. Don't miss out on mastering the art of Go HTTP services
    SUBSCRIBE OR GET LAID OFF
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝
    #coding #neovim #typescript #programming #vim #softwareengineering #codinglife #webdesign #webdevelopment #webdev #javascript #rustlang #rust #twitch #twitchstreamer #programmerhumor #codinghumor #software #softwareengineer #softwaredeveloper #softwaredevelopment #gymbro #gym #programmerhumor #programming #coding #golang #go #golanguage
  • Наука та технологія

КОМЕНТАРІ • 40

  • @MelkeyDev
    @MelkeyDev  2 місяці тому +7

    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!

  • @cabanford
    @cabanford 2 дні тому +2

    Like your channel (interested in learning Go). Found you from the Primeagen...
    Your video cuts remind me of Max Headroom (from 80s MTV) 😂

  • @lcarv20
    @lcarv20 2 місяці тому +1

    Really cool video, factory for middleware is one thing I have been doing since I learned go.

  • @ninthsun
    @ninthsun Місяць тому

    Thanks for introducing awesome post

  • @pbentesio
    @pbentesio 2 місяці тому +2

    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  2 місяці тому

      i love when things just make sense.
      Just gets the BLOOD FLOWING

  • @NoctuaDeveloppement
    @NoctuaDeveloppement 2 місяці тому +1

    Nice video man, good to have more content to rely on. Thanks and keep up

    • @MelkeyDev
      @MelkeyDev  2 місяці тому +1

      Thank you.
      I will always do my best

  • @nikolam-dev
    @nikolam-dev 2 місяці тому +1

    Nice edition, good job

    • @MelkeyDev
      @MelkeyDev  2 місяці тому

      Thank you - hope you enjoy

  • @RayAndrewsDev
    @RayAndrewsDev 2 місяці тому +2

    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

  • @user-ow2im7os8k
    @user-ow2im7os8k 2 місяці тому +3

    Excellent content as always. Hopefully the UA-cam gods start showing you the love your channel deserves.

    • @MelkeyDev
      @MelkeyDev  2 місяці тому

      Haha - pray to the algo Gods LOL

  • @dikan34
    @dikan34 2 місяці тому +4

    Best go content on yt ❤

    • @MelkeyDev
      @MelkeyDev  2 місяці тому +1

      A lot of great people out there make some great Go content but thank you ery much

  • @qoobes
    @qoobes 7 днів тому +1

    Another banger

  • @whiteshadow7810
    @whiteshadow7810 2 місяці тому +2

    nice video i coming from Javascript world , Thank you for helping keep going

    • @MelkeyDev
      @MelkeyDev  2 місяці тому +1

      :) no problem. Thank you for the comment

  • @falasefemi3344
    @falasefemi3344 2 місяці тому +1

    Thanks for this

    • @MelkeyDev
      @MelkeyDev  2 місяці тому

      Youre very welcome

  • @internetkite
    @internetkite 2 місяці тому

    Thank you 🙏

  • @theyioel
    @theyioel 2 місяці тому +1

    It reminds me of the Flask boilerplates in Python.

  • @gearboxworks
    @gearboxworks 2 місяці тому +2

    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 UA-cam 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  2 місяці тому +1

      team structs baby

    • @TehKarmalizer
      @TehKarmalizer Місяць тому +1

      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.

  • @ashimov1970
    @ashimov1970 19 днів тому

    Why Chi? Aren't there Go native capabilities to make REST APIs?

  • @jt099
    @jt099 2 місяці тому +1

    😂😂😂😂😂
    Shoutout to if err != nil had me rolling

  • @iamwitchergeraltofrivia9670
    @iamwitchergeraltofrivia9670 Місяць тому

    Best way not workung enything on steam

  • @dyto2287
    @dyto2287 2 місяці тому +1

    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  2 місяці тому

      team interface{} baby haha

  • @marius-mihailionte339
    @marius-mihailionte339 Місяць тому

    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.