pgBaseDir returns the sqlc-specific directory where PostgreSQL is installed, using the user's cache directory (~/.cache/sqlc/postgresql on Linux).
()
| 109 | // pgBaseDir returns the sqlc-specific directory where PostgreSQL is installed, |
| 110 | // using the user's cache directory (~/.cache/sqlc/postgresql on Linux). |
| 111 | func pgBaseDir() string { |
| 112 | cacheDir, err := os.UserCacheDir() |
| 113 | if err != nil { |
| 114 | cacheDir = filepath.Join(os.Getenv("HOME"), ".cache") |
| 115 | } |
| 116 | return filepath.Join(cacheDir, "sqlc", "postgresql") |
| 117 | } |
| 118 | |
| 119 | // pgBinDir returns the path to the PostgreSQL bin directory. |
| 120 | func pgBinDir() string { |
no test coverage detected