"Accept interfaces and return structs" when accepting factory functions

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • echotron

    An elegant and concurrent library for the Telegram bot API in Go.

  • Thanks! I came across this when i had a look at the echotron library. In this example you can see, that the NewDispatcher function expects a factory function that returns an instance of a specific interface. Thats why i was wondering whats the cleanest approach for these kinds of use-cases is.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts