fix: load gcs credentials and client inside DriverConstructor
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
012adcae7d
commit
5bd7f25880
1 changed files with 33 additions and 33 deletions
|
@ -34,6 +34,7 @@ func init() {
|
|||
}
|
||||
}
|
||||
|
||||
gcsDriverConstructor = func(rootDirectory string) (storagedriver.StorageDriver, error) {
|
||||
jsonKey, err := os.ReadFile(credentials)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Error reading JSON key : %v", err))
|
||||
|
@ -67,7 +68,6 @@ func init() {
|
|||
panic(fmt.Sprintf("Error initializing gcs client : %v", err))
|
||||
}
|
||||
|
||||
gcsDriverConstructor = func(rootDirectory string) (storagedriver.StorageDriver, error) {
|
||||
parameters := driverParameters{
|
||||
bucket: bucket,
|
||||
rootDirectory: rootDirectory,
|
||||
|
|
Loading…
Reference in a new issue