You can also use the Cloud SQL proxy directly from a Go program.
These packages are primarily used as implementation for the Cloud SQL proxy command, and may be changed in backwards incompatible ways in the future.
If your program is written in Go you can use the Cloud SQL Proxy as a library, avoiding the need to start the Proxy as a companion process.
Alternatively, there are Cloud SQL Connectors for Java and Python.
If you're using the MySQL go-sql-driver you can use helper
functions found in the proxy/dialers/mysql
See example usage.
If you're using the Postgres lib/pq, you can
use the cloudsqlpostgres driver from here.
See example usage.