Go For TypeScript Developers - Use Your TypeScript Skills to Learn Go

Поділитися
Вставка
  • Опубліковано 3 лип 2024
  • Repository: github.com/TomDoesTech/go-for...
    0:00 Introduction
    1:27 Code walkthrough
    24:43 Code refactor
    43:44 Start building project
    1:00:40 Healthcheck handler
    1:04:06 Datastore
    1:28:13 Create handler
    1:42:46 Create handler unit test
    1:59:50 Get handler
    2:06:58 Get handler unit test
    2:17:45 Outro
    🌎 Follow me here:
    Discord: / discord
    Twitter: / tomdoes_tech
    Facebook: / tomdoestech​
    Instagram: / tomdoestech​
    TikTok: / tomdoes_tech
    ☕ Buy me a coffee: www.buymeacoffee.com/tomn
  • Розваги

КОМЕНТАРІ • 40

  • @pankaj_9998
    @pankaj_9998 5 місяців тому +5

    Hello Tom, thanks for this video, please also create more content around go lang.

  • @completelyuncreativ
    @completelyuncreativ 5 місяців тому +2

    I just got started in learning Go and I'm super happy you released a video about it 🎉 It's been a pleasure to learn go for it's simplicity, yet it is super powerful. After some research I decided to for chi, ent (check if you haven't came across) and pg, which is really fun to use. Keep up the Go content 😍

  • @yuxiang4218
    @yuxiang4218 5 місяців тому +1

    Great content! very helpful!

  • @sagnikc4
    @sagnikc4 3 місяці тому +1

    thanks tom ! was looking arouns for resources to inplement my backend in go

  • @ThiagoVieira91
    @ThiagoVieira91 5 місяців тому +1

    Ooooh here we go on the Go express 🚂

  • @mohit84604
    @mohit84604 5 місяців тому +7

    I am just rewriting my typescript backend into golang because after seeing its performance i am just become the fan of it

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +1

      It's performance is great, but I don't the language design itself is the best reason to use Go over Node for backend apps

  • @0xtz_
    @0xtz_ 5 місяців тому +1

    👏🤝🤝 amazing video

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

    Hi Tom, may I know what is the reasoning for creating HealthcheckHandler struct and a TodoHandler struct and then creating a function that returns a pointer to the struct?

  • @tswithnovrii
    @tswithnovrii 5 місяців тому

    Hy, Tom. I'm sorry If I ask oot question.
    When you were using Mac in your previous videos, how did you manage to make the video full 1920x1080 (16:9) with a Mac which is not 16:9?
    I also use OBS.
    Thanks, in advance for this great video, Tom

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      You need to set the canvas size in OBS. It will cut off a slice of the window but you can adjust the window to fit

  • @kpopcat_official
    @kpopcat_official 5 місяців тому +1

    tom, could you build a realtime scaleable chat app in go like you did in node? then benchmark and compare it to the one you built in node to see how differently they perform

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +1

      It could be cool to build a real-time project in Go. Not sure about comparing the 2 though, I don't think it would be fair without running them in prod

    • @rod6722
      @rod6722 5 місяців тому

      @@TomDoesTech Comparing the dev experience could be cool, though.

  • @timibolu
    @timibolu 5 місяців тому +1

    I prefer typescript for my backend. I am familiar with it and like the syntax. I wish Typescript was as fast as go

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +1

      TypeScript is a perfectly fine choice for the backend but there are a few reasons to consider Go besides from speed

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

      @@TomDoesTech which ones?

  • @mayanksharma6927
    @mayanksharma6927 5 місяців тому

    Hey Tom! Why did you use & at line 59 at 15:35?

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +2

      It creates a pointer to the http.Server struct, so if you wanted to you can pass the same instance of svr around. In this case it makes no difference. I've only ever seen it as a pointer so I always do it

  • @noNullMoments
    @noNullMoments 5 місяців тому

    Tom could you please make a guide for ai assisted testing (codium, duet etc). It would really help alot of aspiring developers. Much appreciated 👍

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +1

      I'm not familiar with that unfortunently. I also wouldn't recommend an aspiring developer to use any AI tools.

    • @noNullMoments
      @noNullMoments 5 місяців тому

      ​@@TomDoesTechsorry but I beg to differ. I managed to not knowing what a variable was to now after a yr am writing web servers in actix and scripting bots in lua to make a small side income stream through triangular arbitrage. It's obviously not the tool but how you use it. I get wat u're saying that developers would never bother to get a depth in knowledge if someone (something) else does it for them but I can speak for myself that being stuck at Soo many places Soo many times it would have been very easy to lose motivation to learn or persevere . You obviously have strong opinions about the tech but you know that for times not too far away it's the productivity and efficiency of execution would be the decisive factor may be more than skill or proficiency. Again success is a very subjective thing and may mean different things to different people. Anyway. Thanks for taking the time to reply.

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      @@noNullMoments AI tools are useful, I use them every day. But you're going to be better off if you start without using them and then get them to automate the things you already know how to do.

    • @johnkucharsky6927
      @johnkucharsky6927 5 місяців тому

      ​@@TomDoesTech Usually i spend more time to fix errors that ai made. So i dropped that. Unfortunately i can't use github copilot, it's unavailable in Russia, maybe copilot is better than tools i've been using

  • @nested9301
    @nested9301 5 місяців тому +3

    is go a good option for enterprise applications?

    • @mohit84604
      @mohit84604 5 місяців тому +1

      yes Discord is built on top of golang( microservices )

    • @Luka_brx
      @Luka_brx 5 місяців тому

      go is the best

    • @semyaza555
      @semyaza555 5 місяців тому

      @@mohit84604I thought discord was built on Elixir?

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      Yeah, GO is a great choice for enterprise. A lot of the cloud-native tools are built with Go, like Docker and K8s. It was also invented at Google and is used widely there

  • @johnkucharsky6927
    @johnkucharsky6927 5 місяців тому

    Is it more robust then node?

    • @TomDoesTech
      @TomDoesTech  5 місяців тому +1

      You can write crappy code in any language. I find it easier to write robust code in Go, mainly because of the error checking

  • @IkraamDev
    @IkraamDev 5 місяців тому +1

    I need to actually learn Golang for real.

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      Now is a great time to learn it

  • @mohit84604
    @mohit84604 5 місяців тому +1

    why are you using chi instead of fiber

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      I've never used Fiber in production, but I have used Chi. I also like that Chi is not a massive abstraction over the standard library

    • @johnkucharsky6927
      @johnkucharsky6927 5 місяців тому +1

      @@TomDoesTech Do you use gorm in production? How do you validate json in production?

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      @@johnkucharsky6927 I haven't use gorm in prod. Usually use the validator package

  • @umernasir4217
    @umernasir4217 5 місяців тому +1

    Please show that how we can deploy it for free.

    • @TomDoesTech
      @TomDoesTech  5 місяців тому

      I'm not sure how you could deploy it for free. Maybe fly.io?

    • @mohmin8226
      @mohmin8226 5 місяців тому

      U can use render for that