lazyCredsOpener obtains Application Default Credentials on the first call to OpenPostgresURL.
| 59 | // lazyCredsOpener obtains Application Default Credentials on the first call |
| 60 | // to OpenPostgresURL. |
| 61 | type lazyCredsOpener struct { |
| 62 | init sync.Once |
| 63 | opener *URLOpener |
| 64 | err error |
| 65 | } |
| 66 | |
| 67 | func (o *lazyCredsOpener) OpenPostgresURL(ctx context.Context, u *url.URL) (*sql.DB, error) { |
| 68 | o.init.Do(func() { |
nothing calls this directly
no outgoing calls
no test coverage detected