Our great sponsors
-
sarama
Discontinued Sarama is a Go library for Apache Kafka. [Moved to: https://github.com/IBM/sarama]
-
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.
-
go-sql-driver/mysql
Go MySQL Driver is a MySQL driver for Go's (golang) database/sql package (by go-sql-driver)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
https://github.com/Shopify/sarama (Apache Kafka driver)
https://github.com/go-redis/redis (Redis driver).
For example, here's how to use the MySQL driver package with database/sql:
If you're not a fan of how Go does its templating, alternatives exist, such as the Plush library.
https://github.com/gocql/gocql (Cassandra driver).
The database/sql package provides a generic interface around SQL (or SQL-like) databases. It must be used in conjunction with a database driver, such as the ones listed here. When importing a database driver, you need to prefix it with an underscore _ to initialize it.
You can use a library like Alice to transform the above construct to a more readable form such as:
https://github.com/mongodb/mongo-go-driver (MongoDB driver).