How we explored the best practices of GoReleaser X CGO

This page summarizes the projects mentioned and recommended in the original post on dev.to

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

    Go library to parse and normalize SQL queries using the PostgreSQL query parser

  • When implementing SQL Review for PostgreSQL, we introduced pg_query_go as the PostgreSQL parser. The pg_query_go uses the native PostgreSQL parser via C bind, which naturally requires CGO support.

  • goreleaser

    Deliver Go binaries as fast and easily as possible

  • In the Bytebase 1.2.1 release, we found that the GoReleaser did not work correctly, and the error message pointed to pg_query_go. Fortunately, this version did not use pg_query_go. So we first added the "!release" Golang tag to ensure a successful release. Then we started the long road to fight against GoReleaser and CGO.

  • 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
  • goreleaser-cross

    Docker image for Golang cross-compiling with CGO

  • But the docs shed some light: the "This project" mentioned is actually goreleaser/goreleaser-cross, so let's go to goreleaser-cross next!

  • go-sqlite3

    sqlite3 driver for go using database/sql

  • Bytebase already depended on go-sqlite3, which is also a CGO-dependent package. So why didn't it cause problems before?

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