I'm not quite understanding how the google sheets api for go works.
What I want to do is delete sheet at location 0 from a spreadsheet. Here is the code snippit for the request that doesn't work right now.
rb2 := &sheets.BatchUpdateSpreadsheetRequest{
Requests: requests,
}
resp2, err := srv.Spreadsheets.BatchUpdate(destinationSpreadsheetId, rb3).Do()
What I thought I'd do is create request
before making the request body on line 1 above.
ds := &sheets.DeleteSheetRequest{
SheetId: int64(0),
}
deleteSheet := &sheets.DeleteSheet{
DeleteSheetRequest: ds,
}
requests := []*sheets.Request{
DeleteSheet: deleteSheet,
}
If I try to build it, the compiler will error,
sheets\sheets.go:118:19: undefined: sheets.DeleteSheet
sheets\sheets.go:123:4: undefined: DeleteSheet
I was trying to follow the sheets manual, https://godoc.org/google.golang.org/api/sheets/v4#BatchUpdateSpreadsheetRequest
sheets.DeleteSheetRequest
and notsheets.DeleteSheet
?.DeleteSheet
is underRequest
notsheets
– tehhowch