Skip to content

Commit e939106

Browse files
authored
Add Setter and Getter functions to results spreadsheet google creds (redhat-best-practices-for-k8s#2443)
* Add Setter and Getter functions to results spreadsheet google credentials * typo fix * send creds as an arg to CreateSheetsAndDriveServices instead using setter and getter
1 parent d170e75 commit e939106

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/certsuite/upload/results_spreadsheet/results_spreadsheet.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func readCSV(fp string) ([][]string, error) {
7373
return records, nil
7474
}
7575

76-
func CreateSheetsAndDriveServices() (sheetService *sheets.Service, driveService *drive.Service, err error) {
76+
func CreateSheetsAndDriveServices(credentials string) (sheetService *sheets.Service, driveService *drive.Service, err error) {
7777
ctx := context.Background()
7878
b, err := os.ReadFile(credentials)
7979
if err != nil {
@@ -321,7 +321,7 @@ func createRawResultsSheet(fp string) (*sheets.Sheet, error) {
321321
}
322322

323323
func generateResultsSpreadSheet() {
324-
sheetService, driveService, err := CreateSheetsAndDriveServices()
324+
sheetService, driveService, err := CreateSheetsAndDriveServices(credentials)
325325
if err != nil {
326326
log.Fatalf("Unable to create services: %v", err)
327327
}

0 commit comments

Comments
 (0)