DEV Community

Nik L.
Nik L.

Posted on • Updated on

Streamlining Code with go generate for Reduced Boilerplate

Thought of delving more in Go, after this article:


The Go programming language is renowned for its simplicity, power, exceptional tooling, and widespread adoption. Nevertheless, as is typical with strongly typed languages, developers often find themselves crafting significant amounts of boilerplate code to establish connections and perform routine tasks.

In this article, we'll delve into three key aspects:

  1. Why Code Generation in Go: The rationale behind employing code generation in Go to alleviate boilerplate code.

  2. Foundations of Code Generation in Go: Exploring the fundamental elements and libraries that facilitate code generation.

  3. Learning from Examples: Discovering existing code generation tools and projects to gain insights and inspiration.

Leveraging Code Generation to Reduce Boilerplate

Developers sometimes attempt to diminish boilerplate by using reflection and introducing methods that accept the generic interface{} type. However, this approach sacrifices type safety. When interface{} is employed, the compiler cannot ensure that the correct types are being used, which increases the risk of runtime errors.

Many instances of boilerplate code can be inferred from the existing project codebase. To address this, developers can create tools that analyze the project's source code and generate the necessary code automatically.

Elements of Code Generation in Go

To implement code generation effectively in Go, developers need to master the fundamental elements that facilitate code analysis and generation.

  • Reading Code: The Go standard library provides several packages for reading and parsing code:

    • go/build: Gathers information about Go packages, including directory locations, code and test files, and dependencies.
    • go/scanner and go/parser: These packages read source code and parse it into an Abstract Syntax Tree (AST).
    • go/ast: Declares types used to represent the AST and provides methods for traversing and modifying the tree.
    • go/types: Defines data types and algorithms for type-checking Go packages. This package processes the AST to provide type information.
  • Generating Code: Most projects rely on the text/template package to generate code. It's advisable to begin generated files with a comment indicating that the code is automatically generated, specifying the generating tool and emphasizing that manual edits should be avoided.

Example Comment:

/*
* CODE GENERATED AUTOMATICALLY WITH github.com/ernesto-jimenez/gogen/unmarshalmap
* THIS FILE SHOULD NOT BE EDITED BY HAND
*/
Enter fullscreen mode Exit fullscreen mode

The go/format package, which contains the logic used by go fmt, can be used to format generated code before writing it.

Using go generate

When developing tools for code generation in Go, two questions frequently arise: When should code generation occur during the development process, and how can generated code be kept up-to-date?

Since Go version 1.4, the go tool includes the generate command, enabling developers to run code generation tools through the go tool itself. Special comments within the source code dictate which commands should be executed during code generation.

To invoke code generation, add a comment in the following format:

//go:generate shell command
Enter fullscreen mode Exit fullscreen mode

The important points to remember are:

  • go generate should be initiated by the developer authoring the program or package and is not automatically triggered by go get.
  • Ensure that all tools specified in go generate are installed and configured on your system, and document where to obtain these tools.

If the code generation tool is located within the same repository, using go run from go:generate is recommended. This allows you to execute code generation without manual building and installation each time the tool is modified.

Initiating Your Code Generation Journey

While the standard library packages for code parsing and generation are powerful, comprehending their usage solely through documentation can be challenging. Learning from existing code generation tools is highly beneficial, serving multiple purposes:

  1. Gaining inspiration for the types of tools you can build.
  2. Learning from the source code of existing tools.
  3. Discovering tools that can be valuable on their own.

Projects for Learning

Two practical examples of code generation tools:

  1. Generating Stubs for Interface Implementation

Have you ever encountered the repetitive task of manually creating method stubs when implementing an interface? The 'impl' tool can automatically generate stubs for you. It scans the standard library to identify the interface and produces the required method implementations.

Example:

   $ impl 'f *File' io.ReadWriteCloser
   func (f *File) Read(p []byte) (n int, err error) {
       panic("not implemented")
   }

   func (f *File) Write(p []byte) (n int, err error) {
       panic("not implemented")
   }

   func (f *File) Close() error {
       panic("not implemented")
   }
Enter fullscreen mode Exit fullscreen mode
  1. Automatic Mock Generation with 'mockery'

Automated Mock Generation with 'mockery'

The testify package offers a robust mock feature, simplifying the process of mocking dependencies during unit testing. Leveraging the implicit satisfaction of interfaces, we can define our dependencies using interfaces and utilize mock objects in place of actual external dependencies.

Here's a straightforward illustration of how to mock an imaginary 'downcaser' interface:

package main

import (
  "testing"

  "github.com/stretchr/testify/mock"
)

type downcaser interface {
  Downcase(string) (string, error)
}

func TestMock(t *testing.T) {
  m := &mockDowncaser{}
  m.On("Downcase", "FOO").Return("foo", nil)
  m.Downcase("FOO")
  m.AssertNumberOfCalls(t, "Downcase", 1)
}
Enter fullscreen mode Exit fullscreen mode

The implementation of the mock object is quite straightforward:

type mockDowncaser struct {
  mock.Mock
}

func (m *mockDowncaser) Downcase(a0 string) (string, error) {
  ret := m.Called(a0)
  return ret.Get(0).(string), ret.Error(1)
}
Enter fullscreen mode Exit fullscreen mode

Remarkably, the mock object can be generated automatically, thanks to the simplicity of the interface definition. This is precisely what 'mockery' accomplishes:

$ mockery -inpkg -testonly -name=downcaser
Generating mock for: downcaser
Enter fullscreen mode Exit fullscreen mode

I routinely employ 'mockery' in conjunction with 'go generate' to effortlessly produce mock implementations for my interfaces. The process entails adding just one line of code to the existing example to set up a functional mock.

package main

import (
  "testing"
)

type downcaser interface {
  Downcase(string) (string, error)
}

//go:generate mockery -inpkg -testonly -name=downcaser

func TestMock(t *testing.T) {
  m := &mockDowncaser{}
  m.On("Downcase", "FOO").Return("foo", nil)
  m.Downcase("FOO")
  m.AssertNumberOfCalls(t, "Downcase", 1)
}
Enter fullscreen mode Exit fullscreen mode

The setup is complete once 'go generate' is executed. Here's an overview of how the process unfolds:

$ go test
# github.com/ernesto-jimenez/test
./main_test.go:14: undefined: mockDowncaser
FAIL    github.com/ernesto-jimenez/test [build failed]

$ go generate
Generating mock for: downcaser

$ go test
PASS
ok      github.com/ernesto-jimenez/test 0.011s
Enter fullscreen mode Exit fullscreen mode

Any modifications to the interface are seamlessly accommodated by running 'go generate,' ensuring that the corresponding mock remains up to date. 'mockery' played a pivotal role in my journey, leading me to contribute to testify/mock and ultimately assume the role of a maintainer for the project. However, it's worth noting that 'mockery' was developed before the inclusion of 'go/types' in the standard library in Go version 1.5. Consequently, it relies on the lower-level 'go/ast,' which can make the code more complex to follow and may introduce issues when generating mocks for interfaces that employ composition.

Exploring 'gogen' Experiments

The author of this article has open-sourced a code generation package called 'gogen.' It currently includes three tools:

  1. goautomock: Similar to 'mockery' but implemented using 'go/types' rather than 'go/ast,' making it compatible with composed interfaces and standard library interfaces.

  2. gounmarshalmap: Generates an UnmarshalMap(map[string]interface{}) function for a struct, decoding a map into the struct. It serves as an alternative to 'mapstructure,' relying on code generation instead of reflection.

  3. gospecific: A small experiment to generate specific packages from generic ones using interface{}. It analyzes the generic package's source code and generates a new package with specific types, addressing the use of interface{}.

Conclusion

Code generation is a powerful technique that reduces the burden of writing repetitive code while maintaining type safety. It is widely adopted by projects like Slackline and is likely to see increased use in the future.

However, developers should assess the worthiness of creating a code generation tool for their specific use case before embarking on the development journey.


Here's a list of vendor comparison pages you can check to get to a specific channel vendor.

  1. Ultimate Guide to SaaS In-App Notifications and In-App Inboxes - with Implementation Codes
  2. Mailjet vs SparkPost vs Elastic Email: Which Email Provider Is Better in 2024?
  3. Bandwidth vs Vonage vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  4. Ring Central vs Karix vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  5. Postmark vs Mailjet vs Netcore (formerly Pepipost): Which Email Provider Is Better in 2024?
  6. Understanding SaaS In-App Notifications - How to Implement In-App Inbox Notifications Effectively
  7. SNS vs Telnyx vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  8. Ooma vs Ring Central vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  9. SendGrid vs Mailchimp vs Socketlabs: Which Email Provider Is Better in 2024?
  10. SNS vs Ooma vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  11. SNS vs Sinch vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  12. SNS vs Ring Central vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  13. SNS vs Plivo vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  14. SNS vs Twilio vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  15. Telnyx vs Ooma vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  16. Bandwidth vs Ooma vs Ring Central Comparison: Which SMS Provider Is Better in 2024?
  17. SNS vs Telnyx vs Twilio Comparison: Which SMS Provider Is Better in 2024?
  18. Bandwidth vs Twilio vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  19. Plivo vs Sinch vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  20. Bandwidth vs Telnyx vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  21. Telnyx vs Twilio vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  22. Telnyx vs Messagebird vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  23. SNS vs Bandwidth vs Ring Central Comparison: Which SMS Provider Is Better in 2024?
  24. Plivo vs Sinch vs Karix Comparison: Which SMS Provider Is Better in 2024?
  25. Ooma vs Twilio vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  26. Telnyx vs Twilio vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  27. Ring Central vs Twilio vs Vonage Comparison: Which SMS Provider Is Better in 2024?
  28. Bandwidth vs Plivo vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  29. Bandwidth vs Ring Central vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  30. Ring Central vs Vonage vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  31. SNS vs Karix vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  32. Vonage vs Sinch vs Karix Comparison: Which SMS Provider Is Better in 2024?
  33. Ring Central vs Plivo vs Karix Comparison: Which SMS Provider Is Better in 2024?
  34. Ring Central vs Messagebird vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  35. SNS vs Ring Central vs Karix Comparison: Which SMS Provider Is Better in 2024?
  36. Ring Central vs Twilio vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  37. Ooma vs Twilio vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  38. SNS vs Ooma vs Ring Central Comparison: Which SMS Provider Is Better in 2024?
  39. Ooma vs Sinch vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  40. Bandwidth vs Exotel vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  41. Bandwidth vs Vonage vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  42. Exotel vs Gupshup vs SNS Comparison: Which SMS Provider Is Better in 2024?
  43. SNS vs Ooma vs Messagebird Comparison: Which SMS Provider Is Better in 2024?
  44. Ooma vs Vonage vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  45. Ooma vs Ring Central vs Vonage Comparison: Which SMS Provider Is Better in 2024?
  46. Bandwidth vs Vonage vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  47. Bandwidth vs Twilio vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  48. Bandwidth vs Ring Central vs Plivo Comparison: Which SMS Provider Is Better in 2024?
  49. SNS vs Telnyx vs Karix Comparison: Which SMS Provider Is Better in 2024?
  50. SNS vs MessageBird vs Karix Comparison: Which SMS Provider Is Better in 2024?
  51. RingCentral vs Vonage vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  52. SNS vs Sinch vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  53. SNS vs Telnyx vs Vonage Comparison: Which SMS Provider Is Better in 2024?
  54. RingCentral vs Twilio vs MessageBird Comparison: Which SMS Provider Is Better in 2024?
  55. SNS vs MessageBird vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  56. Telnyx vs Plivo vs Sinch Comparison: Which SMS Provider Is Better in 2024?
  57. Ooma vs Vonage vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  58. SNS vs RingCentral vs Vonage Comparison: Which SMS Provider Is Better in 2024?
  59. Bandwidth vs Sinch vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  60. SNS vs Ooma vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  61. Ooma vs Sinch vs Karix Comparison: Which SMS Provider Is Better in 2024?
  62. Exotel vs Gupshup vs Telnyx Comparison: Which SMS Provider Is Better in 2024?
  63. Vonage vs Plivo vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  64. Sinch vs MessageBird vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  65. Bandwidth vs RingCentral vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  66. Ooma vs Sinch vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  67. Ooma vs RingCentral vs Twilio Comparison: Which SMS Provider Is Better in 2024?
  68. Exotel vs Gupshup vs Bandwidth Comparison: Which SMS Provider Is Better in 2024?
  69. SNS vs Karix vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  70. Bandwidth vs Ooma vs MessageBird Comparison: Which SMS Provider Is Better in 2024?
  71. Bandwidth vs Karix vs Exotel Comparison: Which SMS Provider Is Better in 2024?
  72. Bandwidth vs Plivo vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  73. SendGrid vs Mailgun vs Postmark: Which Email Provider Is Better in 2024?
  74. SNS vs Plivo vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  75. SMTP.com vs Elastic Email vs SocketLabs: Which Email Provider Is Better in 2024?
  76. SNS vs Bandwidth vs Gupshup Comparison: Which SMS Provider Is Better in 2024?
  77. Telnyx vs Twilio vs Vonage Comparison: Which SMS Provider Is Better in 2024?
  78. Mailjet vs Sparkpost vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  79. Ooma vs Ring Central vs Karix: SMS Provider Comparison and Which is Best in 2024
  80. Telnyx vs Twilio vs Karix: SMS Provider Comparison and Which is Best in 2024
  81. Vonage vs Plivo vs Messagebird: SMS Provider Comparison and Which is Best in 2024
  82. Ring Central vs Vonage vs Karix: SMS Provider Comparison and Which is Best in 2024
  83. Postmark vs Mailjet vs Sparkpost: Which Email Provider is Better in 2024?
  84. Mailchimp vs Mailjet vs Mailerlite: Which Email Provider is Better in 2024?
  85. Telnyx vs Sinch vs Exotel: SMS Provider Comparison and Which is Best in 2024
  86. SMTP.com vs Mailjet vs Mailerlite: Which Email Provider is Better in 2024?
  87. Bandwidth vs Telnyx vs Vonage: SMS Provider Comparison and Which is Best in 2024
  88. Vonage vs Messagebird vs Exotel: SMS Provider Comparison and Which is Best in 2024
  89. Bandwidth vs Ooma vs Exotel: SMS Provider Comparison and Which is Best in 2024
  90. Mailjet vs Sparkpost vs Socketlabs: Which Email Provider is Better in 2024?
  91. Mailchimp vs Mailjet vs Socketlabs: Which Email Provider is Better in 2024?
  92. Mailgun vs Mailchimp vs SMTP.com: Which Email Provider is Better in 2024?
  93. Mailchimp vs Amazon SES vs Postmark: Which Email Provider is Better in 2024?
  94. Telnyx vs Twilio: A Comprehensive Comparison for 2024
  95. SNS vs Vonage vs Karix: SMS Provider Comparison and Which is Best in 2024
  96. Bandwidth vs Karix vs Gupshup: SMS Provider Comparison and Which is Best in 2024
  97. Bandwidth vs Ooma vs Vonage: SMS Provider Comparison and Which is Best in 2024
  98. Ring Central vs Vonage vs Gupshup: SMS Provider Comparison and Which is Best in 2024
  99. SNS vs Ooma vs Twilio: SMS Provider Comparison and Which is Best in 2024
  100. SNS vs Ring Central vs Twilio: SMS Provider Comparison and Which is Best in 2024
  101. Mailchimp vs SMTP.com vs Sparkpost: Which Email Provider is Better in 2024?
  102. Mailgun vs Socketlabs vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  103. SMTP.com vs Postmark vs Brevo (formerly Sendinblue): Which Email Provider is Better in 2024?
  104. Twilio vs Sinch vs Exotel: SMS Provider Comparison and Which is Best in 2024
  105. Exotel vs Gupshup vs Vonage: SMS Provider Comparison and Which is Best in 2024
  106. Mailchimp vs Mailjet vs Elastic Email: Which Email Provider is Better in 2024?
  107. Vonage vs Sinch vs Messagebird: SMS Provider Comparison and Which is Best in 2024
  108. Mailgun vs Brevo (formerly Sendinblue) vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  109. Ring Central vs Messagebird vs Karix: SMS Provider Comparison and Which is Best in 2024
  110. Sparkpost vs Socketlabs vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  111. Sendgrid vs Amazon SES vs SMTP.com: Which Email Provider is Better in 2024?
  112. Mailgun vs Elastic Email vs Socketlabs: Which Email Provider is Better in 2024?
  113. Amazon SES vs Elastic Email vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  114. Telnyx vs Ooma vs Twilio: SMS Provider Comparison and Which is Best in 2024
  115. Elastic Email vs Socketlabs vs Mailerlite: Which Email Provider is Better in 2024?
  116. SNS vs Vonage vs Plivo: SMS Provider Comparison and Which is Best in 2024
  117. Postmark vs Sparkpost vs Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  118. Telnyx vs Ring Central vs Plivo: SMS Provider Comparison and Which is Best in 2024
  119. Ooma vs Vonage vs Karix: SMS Provider Comparison and Which is Best in 2024
  120. Bandwidth vs Plivo vs Karix: SMS Provider Comparison and Which is Best in 2024
  121. SNS vs Vonage vs Sinch: SMS Provider Comparison and Which is Best in 2024
  122. Sinch vs Messagebird vs Gupshup: SMS Provider Comparison and Which is Best in 2024
  123. SNS vs Bandwidth vs Sinch: SMS Provider Comparison and Which is Best in 2024
  124. Bandwidth vs Ooma vs Twilio: SMS Provider Comparison and Which is Best in 2024
  125. Telnyx vs Twilio vs Sinch: SMS Provider Comparison and Which is Best in 2024
  126. Ooma vs Vonage vs Sinch: SMS Provider Comparison and Which is Best in 2024
  127. Telnyx vs Ooma vs Plivo: SMS Provider Comparison and Which is Best in 2024
  128. SNS vs Telnyx vs Sinch: SMS Provider Comparison and Which is Best in 2024
  129. Bandwidth vs Ring Central vs Karix: SMS Provider Comparison and Which is Best in 2024
  130. SNS vs Sinch vs Gupshup: SMS Provider Comparison and Which is Best in 2024
  131. Twilio vs Sinch vs Gupshup: SMS Provider Comparison and Which is Best in 2024
  132. Bandwidth vs. Telnyx vs. Gupshup: Which SMS Provider is Right for You?
  133. Bandwidth vs. Sinch vs. Karix: Choosing the Best SMS Provider for Your Business
  134. Mailgun vs. Mailjet vs. Elastic Email: An In-Depth Comparison
  135. Vonage vs. Plivo vs. Gupshup: Selecting the Top SMS Gateway
  136. Telnyx vs. Plivo vs. Exotel: Finding the Perfect Match for Your Messaging Needs
  137. Twilio vs. Sinch vs. Karix: Comparing Features and Functionality
  138. Telnyx vs. Sinch vs. Gupshup: Evaluating Options for Enterprise Communications
  139. Ooma vs. Twilio vs. Vonage: Which SMS Service Should You Choose?
  140. Postmark vs. Mailjet vs. SocketLabs: The Ultimate Email Provider Showdown
  141. Sparkpost vs. Brevo (SendinBlue) vs. NetCore: Comparing Prices and Services
  142. Ooma vs. Twilio vs. Sinch: Selecting the Ideal Partner for Global Communication
  143. Mailgun vs. SMPT.com vs. Mailjet: Determining the Best Solution for Your Workflow
  144. Amazon SES vs. Vonage vs. MessageBird: Assessing SMS Capabilities
  145. Plivo vs. Sinch vs. MessageBird: Identifying Key Differences in APIs
  146. Amazon SES vs. Sparkpost vs. SocketLabs: Optimizing Your Email Marketing Strategy
  147. Postmark vs. Sparkpost vs. Elastic Email: Measuring Deliverability and Performance
  148. Mailchimp vs. Sparkpost vs. Elastic Email: Balancing Cost and Quality
  149. SendGrid vs. Mailchimp vs. MailerLite: Comparing Features and Usability
  150. Amazon SES vs. Mailjet vs. Brevo (SendinBlue): Maximizing ROI with Automation Tools
  151. SendGrid vs. Amazon SES vs. Sparkpost: Deciding Between Three Leading Providers
  152. Twilio vs. Plivo vs. Exotel: Enhancing Customer Experience through Bulk SMS
  153. Amazon SES vs. SMTP.com vs. NetCore: Streamlining Transactional Emails
  154. Mailchimp vs. Amazon SES vs. Sparkpost: Boosting Engagement with Personalized Campaigns
  155. Telnyx vs. Plivo vs. MessageBird: Integrating Voice and Video into Your Application
  156. SendGrid vs. MailChimp vs. Sparkpost: Improving Conversion Rates with Effective Content
  157. Telnyx vs. Vonage vs. MessageBird: Expanding Reach Across Borders
  158. SNS vs. Bandwidth vs. Ooma: Scaling Up with Advanced Telephony Solutions
  159. Exotel vs. Gupshup vs. Sinch: Building a Robust Chatbot Platform
  160. Mailchimp vs. SMTP.com: Which Email Provider is Better in 2024?
  161. SNS vs. RingCentral vs. Sinch: Which SMS Provider is Better in 2024?
  162. Amazon SES vs. Mailjet vs. MailerLite: Which Email Provider is Better in 2024?
  163. Mailgun vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  164. Postmark vs. SparkPost vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  165. Mailgun vs. Mailchimp vs. Amazon SES: Which Email Provider is Better in 2024?
  166. Mailchimp vs. MailerLite: Which Email Provider is Better in 2024?
  167. Mailchimp vs. Mailjet: Which Email Provider is Better in 2024?
  168. SMTP.com vs. Mailjet vs. SparkPost: Which Email Provider is Better in 2024?
  169. Mailchimp vs. Mailjet vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  170. Mailchimp vs. Elastic Email vs. MailerLite: Which Email Provider is Better in 2024?
  171. Amazon SES vs. SMTP.com vs. Elastic Email: Which Email Provider is Better in 2024?
  172. Amazon SES vs. Postmark vs. Socketlabs: Which Email Provider is Better in 2024?
  173. Amazon SES vs. SMTP.com vs. Mailjet: Which Email Provider is Better in 2024?
  174. Mailchimp vs. SMTP.com vs. Postmark: Which Email Provider is Better in 2024?
  175. Sendgrid vs. Mailchimp vs. Postmark: Which Email Provider is Better in 2024?
  176. Sendgrid vs. Elastic Email vs. MailerLite: Which Email Provider is Better in 2024?
  177. Mailchimp vs. Postmark vs. MailerLite: Which Email Provider is Better in 2024?
  178. Mailgun vs. Mailchimp vs. MailerLite: Which Email Provider is Better in 2024?
  179. Mailgun vs. SparkPost vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  180. Mailgun vs. Amazon SES vs. MailerLite: Which Email Provider is Better in 2024?
  181. Sendgrid vs. Postmark vs. MailerLite: Which Email Provider is Better in 2024?
  182. SMTP.com vs Mailjet vs Netcore (formerly Pepipost): A Comparison of Email Providers in 2024
  183. Mailchimp vs Amazon SES vs Socketlabs: Which Email Provider is Best in 2024?
  184. Mailgun vs Sparkpost vs Socketlabs: Which Email Provider is Superior in 2024?
  185. Sendgrid vs Mailgun vs Mailjet: Which Email Provider Prevails in 2024?
  186. Mailgun vs Amazon SES vs SMTP.com: A Comparison of Email Providers in 2024
  187. Ooma vs Messagebird vs Gupshup: A Comparison of SMS Providers in 2024
  188. SMTP.com vs Postmark vs Elastic Email: A Comparison of Email Providers in 2024
  189. Sendgrid vs Postmark vs Socketlabs: A Comparison of Email Providers in 2024
  190. Bandwidth vs Vonage vs Karix: A Comparison of SMS Providers in 2024
  191. Mailgun vs SMTP.com vs Elastic Email: A Comparison of Email Providers in 2024
  192. Amazon SES vs Elastic Email vs Brevo (formerly Sendinblue): A Comparison of Email Providers in 2024
  193. 7 Best Amazon SNS Alternatives and Competitors in 2024: SMS Latency, Pricing, Compliance & API
  194. Postmark vs Socketlabs vs Mailerlite: A Comparison of Email Providers in 2024
  195. 7 Best Karix Alternatives and Competitors in 2024: SMS Latency, Pricing, Compliance & API
  196. Sendgrid vs Mailchimp vs Elastic Email: A Comparison of Email Providers in 2024
  197. Bandwidth vs Telnyx vs Karix: A Comparison of SMS Providers in 2024
  198. Mailgun vs. Mailchimp vs. Elastic Email: Which Email Provider is Better in 2024?
  199. Postmark vs. Mailjet vs. Elastic Email: Which Email Provider is Better in 2024?
  200. Sendgrid vs. Mailgun vs. Elastic Email: Which Email Provider is Better in 2024?
  201. Sendgrid vs. Postmark: Which Email Provider is Better in 2024?
  202. Vonage vs. MessageBird vs. Karix Comparison: Which SMS Provider is Better in 2024?
  203. Mailchimp vs. SparkPost: Which Email Provider is Better in 2024?
  204. SNS vs. Plivo vs. Exotel Comparison: Which SMS Provider is Better in 2024?
  205. Mailgun vs. SMTP.com vs. SparkPost: Which Email Provider is Better in 2024?
  206. Sendgrid vs. Mailgun vs. SMTP.com: Which Email Provider is Better in 2024?
  207. Telnyx vs. Ooma vs. MessageBird Comparison: Which SMS Provider is Better in 2024?
  208. SNS vs. Telnyx vs. Ring Central Comparison: Which SMS Provider is Better in 2024?
  209. SNS vs. Bandwidth vs. Telnyx Comparison: Which SMS Provider is Better in 2024?
  210. SNS vs. Twilio vs. Karix Comparison: Which SMS Provider is Better in 2024?
  211. Elastic Email vs. Socketlabs vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  212. Mailgun vs. Mailchimp vs. Mailjet: Which Email Provider is Better in 2024?
  213. MessageBird vs. Karix vs. Exotel Comparison: Which SMS Provider is Better in 2024?
  214. Twilio vs. MessageBird vs. Exotel Comparison: Which SMS Provider is Better in 2024?
  215. Ring Central vs. Karix vs. Exotel Comparison: Which SMS Provider is Better in 2024?
  216. Telnyx vs. Vonage vs. Sinch Comparison: Which SMS Provider is Better in 2024?
  217. Telnyx vs. Ring Central vs. Vonage Comparison: Which SMS Provider is Better in 2024?
  218. Telnyx vs. Ooma vs. Exotel Comparison: Which SMS Provider is Better in 2024?
  219. Sendgrid vs. Mailjet vs. MailerLite: Which Email Provider is Better in 2024?
  220. Telnyx vs. Exotel vs. Gupshup Comparison: Which SMS Provider is Better in 2024?
  221. Ooma vs. Ring Central vs. Sinch Comparison: Which SMS Provider is Better in 2024?
  222. Twilio vs. Plivo vs. Sinch Comparison: Which SMS Provider is Better in 2024?
  223. Mailchimp vs. SMTP.com vs. MailerLite: Which Email Provider is Better in 2024?
  224. Bandwidth vs. MessageBird 2024
  225. Postmark vs. Elastic Email vs. Socketlabs: Which Email Provider is Better in 2024?
  226. Ooma vs. Twilio vs. MessageBird Comparison: Which SMS Provider is Better in 2024?
  227. Sendgrid vs. Postmark vs. Elastic Email: Which Email Provider is Better in 2024?
  228. Bandwidth vs. Telnyx vs. Ooma Comparison: Which SMS Provider is Better in 2024?
  229. Sendgrid vs. Mailchimp vs. SMTP.com: Which Email Provider is Better in 2024?
  230. Mailgun vs. Mailjet vs. MailerLite: Which Email Provider is Better in 2024?
  231. Mailjet vs. Socketlabs vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  232. Sendgrid vs. Mailgun vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  233. Amazon SES vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  234. Vonage vs. Plivo 2023
  235. Mailchimp vs. Postmark vs. SparkPost: Which Email Provider is Better in 2024?
  236. Mailchimp vs. Elastic Email vs. Socketlabs: Which Email Provider is Better in 2024?
  237. Mailgun vs. Socketlabs vs. MailerLite: Which Email Provider is Better in 2024?
  238. Mailchimp vs. Mailjet vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  239. Mailchimp vs. SMTP.com vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  240. Amazon SES vs. SparkPost vs. Elastic Email: Which Email Provider is Better in 2024?
  241. Amazon SES vs. Mailjet vs. Socketlabs: Which Email Provider is Better in 2024?
  242. Mailchimp vs. Socketlabs vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  243. SMTP.com vs. Mailjet vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  244. Mailchimp vs. Mailjet vs. SparkPost: Which Email Provider is Better in 2024?
  245. Sendgrid vs. SparkPost vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  246. Sendgrid vs. SMTP.com vs. Socketlabs: Which Email Provider is Better in 2024?
  247. Sendgrid vs. SMTP.com vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  248. Sendgrid vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  249. Amazon SES vs. Brevo (formerly SendinBlue) vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  250. Amazon SES vs. SMTP.com vs. SparkPost: Which Email Provider is Better in 2024?
  251. Mailjet vs. Socketlabs vs. MailerLite: Which Email Provider is Better in 2024?
  252. Sendgrid vs. Mailjet vs. SparkPost: Which Email Provider is Better in 2024?
  253. Amazon SES vs. Postmark vs. Mailjet: Which Email Provider is Better in 2024?
  254. Mailchimp vs. SMTP.com vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  255. Sendgrid vs. SMTP.com vs. MailerLite: Which Email Provider is Better in 2024?
  256. Mailchimp vs. Postmark vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  257. Mailjet vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  258. Mailchimp vs. Elastic Email vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  259. SNS vs. Exotel 2024
  260. Sendgrid vs. Mailgun vs. MailerLite: Which Email Provider is Better in 2024?
  261. Mailchimp vs. Postmark vs. Mailjet: Which Email Provider is Better in 2024?
  262. Sendgrid vs. Netcore (formerly Pepipost) vs. MailerLite: Which Email Provider is Better in 2024?
  263. Sendgrid vs. Elastic Email vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  264. Postmark vs. Elastic Email vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  265. Mailgun vs. SMTP.com vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  266. SMTP.com vs. Postmark vs. SparkPost: Which Email Provider is Better in 2024?
  267. Postmark vs. Elastic Email vs. MailerLite: Which Email Provider is Better in 2024?
  268. SNS vs. MessageBird vs. Exotel: Which SMS Provider is Better in 2024?
  269. SparkPost vs. Elastic Email vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  270. SNS vs. Twilio vs. Vonage: Which SMS Provider is Better in 2024?
  271. RingCentral vs. Plivo vs. Sinch: Which SMS Provider is Better in 2024?
  272. Sendgrid vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  273. SNS vs. Plivo vs. MessageBird: Which SMS Provider is Better in 2024?
  274. Elastic Email vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  275. SNS vs. Twilio vs. Exotel: Which SMS Provider is Better in 2024?
  276. SNS vs. Ooma vs. Twilio: Which SMS Provider is Better in 2024?
  277. Bandwidth vs. RingCentral vs. Gupshup: Which SMS Provider is Better in 2024?
  278. SparkPost vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  279. Postmark vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  280. Amazon SES vs. Mailjet: Which Email Provider is Better in 2024?
  281. Mailgun vs. Socketlabs: Which Email Provider is Better in 2024?
  282. Mailgun vs. SparkPost vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  283. RingCentral vs. Gupshup 2024
  284. Vonage vs. Sinch 2023
  285. Plivo vs. Exotel 2023
  286. Twilio vs. Karix 2023
  287. Postmark vs. SparkPost vs. Socketlabs: Which Email Provider is Better in 2024?
  288. Mailjet vs. Elastic Email vs. Socketlabs: Which Email Provider is Better in 2024?
  289. Sinch vs. Gupshup 2023
  290. Elastic Email vs. Brevo (formerly SendinBlue) vs. MailerLite: Which Email Provider is Better in 2024?
  291. Mailjet vs. SparkPost vs. MailerLite: Which Email Provider is Better in 2024?
  292. Mailjet vs. Netcore (formerly Pepipost) vs. MailerLite: Which Email Provider is Better in 2024?
  293. Mailjet vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  294. Mailgun vs. Mailchimp vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  295. Mailchimp vs. Amazon SES vs. Elastic Email: Which Email Provider is Better in 2024?
  296. Amazon SES vs. SMTP.com vs. Postmark: Which Email Provider is Better in 2024?
  297. SparkPost vs. Brevo (formerly SendinBlue) vs. Socketlabs: Which Email Provider is Better in 2024?
  298. Amazon SES vs. SparkPost vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  299. Mailgun vs. Amazon SES vs. SparkPost: Which Email Provider is Better in 2024?
  300. SMTP.com vs. SparkPost vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  301. Brevo (formerly SendinBlue) vs. Socketlabs vs. MailerLite: Which Email Provider is Better in 2024?
  302. Sendgrid vs. SMTP.com vs. Mailjet: Which Email Provider is Better in 2024?
  303. Mailchimp vs. Elastic Email vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  304. Mailchimp vs. Postmark vs. Elastic Email: Which Email Provider is Better in 2024?
  305. SMTP.com vs. Postmark vs. MailerLite: Which Email Provider is Better in 2024?
  306. Postmark vs. Brevo (formerly SendinBlue) vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  307. Mailgun vs. Amazon SES: Which Email Provider is Better in 2024?
  308. Sendgrid vs. Socketlabs: Which Email Provider is Better in 2024?
  309. SMTP.com vs. MailerLite: Which Email Provider is Better in 2024?
  310. Mailchimp vs. Postmark: Which Email Provider is Better in 2024?
  311. Elastic Email vs. Socketlabs: Which Email Provider is Better in 2024?
  312. Netcore (formerly Pepipost) vs. MailerLite: Which Email Provider is Better in 2024?
  313. Mailgun vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  314. Elastic Email vs. MailerLite: Which Email Provider is Better in 2024?
  315. Postmark vs. Mailjet: Which Email Provider is Better in 2024?
  316. Sendgrid vs. SparkPost: Which Email Provider is Better in 2024?
  317. How Investmint Increased Their Customer Retention Rates by 30% Using SuprSend's Real-Time Broadcast Capability
  318. SparkPost vs. Brevo (Formerly SendinBlue): Which Email Provider is Better in 2024?
  319. Mailchimp vs. Amazon SES: Which Email Provider is Better in 2024?
  320. SparkPost vs. Elastic Email: Which Email Provider is Better in 2024?
  321. Postmark vs. Elastic Email: Which Email Provider is Better in 2024?
  322. SMTP.com vs. Postmark: Which Email Provider is Better in 2024?
  323. Mailgun vs. SparkPost: Which Email Provider is Better in 2024?
  324. Postmark vs. Socketlabs: Which Email Provider is Better in 2024?
  325. Mailjet vs. Brevo (Formerly SendinBlue): Which Email Provider is Better in 2024?
  326. Mailchimp vs. ElasticEmail: Which Email Provider is Better in 2024?
  327. Telnyx vs. Gupshup 2024
  328. Postmark vs. MailerLite: Which Email Provider is Better in 2024?
  329. Amazon SES vs. MailerLite: Which Email Provider is Better in 2024?
  330. SparkPost vs. Socketlabs: Which Email Provider is Better in 2024?
  331. Sendgrid vs. Mailjet: Which Email Provider is Better in 2024?
  332. SMTP.com vs. Elastic Email: Which Email Provider is Better in 2024?
  333. Twilio vs. Exotel 2023
  334. Amazon SES vs. Postmark: Which Email Provider is Better in 2024?
  335. Sendgrid vs. Mailgun: Which Email Provider is Better in 2024?
  336. Mailjet vs. Socketlabs: Which Email Provider is Better in 2024?
  337. Socketlabs vs. Netcore (formerly Pepipost): Which Email Provider is Better in 2024?
  338. Sendgrid vs. AWS SES: Which Email Provider is Better in 2024?
  339. Mailchimp vs. Brevo (formerly SendinBlue): Which Email Provider is Better in 2024?
  340. Mailjet vs. Elastic Email: Which Email Provider is Better in 2024?
  341. SparkPost vs. MailerLite: Which Email Provider is Better in 2024?
  342. SNS vs. Plivo 2024
  343. Telnyx vs. Exotel 2024
  344. Bandwidth vs. Vonage 2024
  345. Vonage vs. Karix 2023
  346. Accelerating Customer Onboarding: How SuprSend Cut eShipz's Customer Onboarding Time by 3 Weeks

Similar to this, I run a developer-centric community on Slack. Where we discuss these kinds of topics, implementations, integrations, some truth bombs, weird chats, virtual meets, and everything that will help a developer remain sane ;) Afterall, too much knowledge can be dangerous too.

I'm inviting you to join our free community, take part in discussions, and share your freaking experience & expertise. You can fill out this form, and a Slack invite will ring your email in a few days. We have amazing folks from some of the great companies, and you wouldn't wanna miss interacting with them. Invite Form

Top comments (1)

Collapse
 
tungvu318 profile image
Tung Vu

Hi, I clicked the link bellow and got 404. Can you re-publish it?

dev.to/nikl/using-golang-to-build-...