Go | 6 Unique Techniques

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ส.ค. 2024
  • Hey everyone, welcome back! Today, we're diving into 6 unique Go techniques that will elevate your coding skills. These techniques are essential tools that can help you write more efficient, idiomatic, and maintainable Go code. Let's get started!
    Timeline:
    0:00 - Introduction
    0:7 - Generate
    1:46 - Build Tags
    3:05 - Functional Options
    6:09 - Context for cancellation
    7:14 - Struct tags
    8:44 - Conclusion
    Links:
    medium: / dadcod
    website: dadcod.es/
    Support Me on Ko-fi: ko-fi.com/dadcod
    Follow Me on Twitter: / _dadcod_
    Subscribe for more content: / @dadcodes
    Thank you for watching! Don't forget to like, subscribe, and hit the notification bell to stay updated with more programming content.
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 11

  • @dominykasbartkus1033
    @dominykasbartkus1033 หลายเดือนก่อน +1

    Oh these are great. Especially the functional options and generators.

    • @dadcodes
      @dadcodes  หลายเดือนก่อน +1

      I understand they do not serve exactly the same purpose, but I wanted to compare them to builders since functional options are much simpler. For someone coming from a heavy OOP Java corporate background, builders might seem like the go-to solution in similar cases, but they shouldn't be.

  • @volodymyrvolodymyr3965
    @volodymyrvolodymyr3965 26 วันที่ผ่านมา +1

    you can use build tags to separate unit and integration tests btw.

  • @Luisya14
    @Luisya14 หลายเดือนก่อน +1

    These are great!!! Awesome video, man!! Keep doing these videos.

    • @dadcodes
      @dadcodes  หลายเดือนก่อน

      I'm so happy you liked it! Thanks for the support :)

  • @juliancorredor1128
    @juliancorredor1128 หลายเดือนก่อน

    Very useful tips, thanks a lot

    • @dadcodes
      @dadcodes  หลายเดือนก่อน

      Glad you liked it! If you have any suggestions, please share them:)

  • @volodymyrvolodymyr3965
    @volodymyrvolodymyr3965 26 วันที่ผ่านมา +1

    what's unique about generating code? Almost every language I know doing it

    • @volodymyrvolodymyr3965
      @volodymyrvolodymyr3965 26 วันที่ผ่านมา +1

      I think it would be even better to show how fast code generation is. For example some JSON parsers use reflection and some code generation.

    • @dadcodes
      @dadcodes  26 วันที่ผ่านมา

      nothing unique per se, but I like that it's built-in, simple and fast.

    • @dadcodes
      @dadcodes  26 วันที่ผ่านมา

      @@volodymyrvolodymyr3965 Reflection is runtime vs compile time for code generation, but it seems like an idea for a separate video :)