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.
If you're using the the MySQL go-sql-driver
you can use helper functions found in the proxy/dialers/mysql package. See example usage.
If you're using the the Postgres lib/pq, you can use the cloudsqlpostgres driver from here. See example usage.