blog.devtrovert.com/p/12-personal-go-tricks-that-transformed/comment/44053058

Preview meta tags from the blog.devtrovert.com website.

Linked Hostnames

3

Thumbnail

Search Engine Appearance

Google

https://blog.devtrovert.com/p/12-personal-go-tricks-that-transformed/comment/44053058

Glenn Lewis on Devtrovert

Very nice, thank you! For # 1.5, I would just add `t.Helper()` as the first line of `handleDBConnection`. For # 3, this is also sometimes called the "Builder" pattern, and if any of the steps could cause an error, but you still want the simplicity of chaining, you can add a `Build` or `Do` method at the end of the chain that returns one or more values, including a (potentially "joined") error (typically accumulated during the building of the chain). I use this builder pattern here, for example: https://github.com/gmlewis/go-bjk/blob/master/examples/bifilar-electromagnet/main.go#L155



Bing

Glenn Lewis on Devtrovert

https://blog.devtrovert.com/p/12-personal-go-tricks-that-transformed/comment/44053058

Very nice, thank you! For # 1.5, I would just add `t.Helper()` as the first line of `handleDBConnection`. For # 3, this is also sometimes called the "Builder" pattern, and if any of the steps could cause an error, but you still want the simplicity of chaining, you can add a `Build` or `Do` method at the end of the chain that returns one or more values, including a (potentially "joined") error (typically accumulated during the building of the chain). I use this builder pattern here, for example: https://github.com/gmlewis/go-bjk/blob/master/examples/bifilar-electromagnet/main.go#L155



DuckDuckGo

https://blog.devtrovert.com/p/12-personal-go-tricks-that-transformed/comment/44053058

Glenn Lewis on Devtrovert

Very nice, thank you! For # 1.5, I would just add `t.Helper()` as the first line of `handleDBConnection`. For # 3, this is also sometimes called the "Builder" pattern, and if any of the steps could cause an error, but you still want the simplicity of chaining, you can add a `Build` or `Do` method at the end of the chain that returns one or more values, including a (potentially "joined") error (typically accumulated during the building of the chain). I use this builder pattern here, for example: https://github.com/gmlewis/go-bjk/blob/master/examples/bifilar-electromagnet/main.go#L155

  • General Meta Tags

    17
    • title
      Comments - 12 Personal Go Tricks That Transformed My Productivity
    • title
    • title
    • title
    • title
  • Open Graph Meta Tags

    7
    • og:url
      https://blog.devtrovert.com/p/12-personal-go-tricks-that-transformed/comment/44053058
    • og:image
      https://substackcdn.com/image/fetch/$s_!GVt1!,f_auto,q_auto:best,fl_progressive:steep/https%3A%2F%2Fdevtrovert.substack.com%2Ftwitter%2Fsubscribe-card.jpg%3Fv%3D-144713612%26version%3D9
    • og:type
      article
    • og:title
      Glenn Lewis on Devtrovert
    • og:description
      Very nice, thank you! For # 1.5, I would just add `t.Helper()` as the first line of `handleDBConnection`. For # 3, this is also sometimes called the "Builder" pattern, and if any of the steps could cause an error, but you still want the simplicity of chaining, you can add a `Build` or `Do` method at the end of the chain that returns one or more values, including a (potentially "joined") error (typically accumulated during the building of the chain). I use this builder pattern here, for example: https://github.com/gmlewis/go-bjk/blob/master/examples/bifilar-electromagnet/main.go#L155
  • Twitter Meta Tags

    8
    • twitter:image
      https://substackcdn.com/image/fetch/$s_!GVt1!,f_auto,q_auto:best,fl_progressive:steep/https%3A%2F%2Fdevtrovert.substack.com%2Ftwitter%2Fsubscribe-card.jpg%3Fv%3D-144713612%26version%3D9
    • twitter:card
      summary_large_image
    • twitter:label1
      Likes
    • twitter:data1
      2
    • twitter:label2
      Replies
  • Link Tags

    32
    • alternate
      /feed?sectionId=83555
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!RD1q!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55a741-22d1-4584-8118-7df4c9eba24d%2Fapple-touch-icon-57x57.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!4nY4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55a741-22d1-4584-8118-7df4c9eba24d%2Fapple-touch-icon-60x60.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!EAQH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55a741-22d1-4584-8118-7df4c9eba24d%2Fapple-touch-icon-72x72.png
    • apple-touch-icon
      https://substackcdn.com/image/fetch/$s_!mKED!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fff55a741-22d1-4584-8118-7df4c9eba24d%2Fapple-touch-icon-76x76.png

Links

14