Release Notes: v0.11.0¶
Release Date: 2026-05-30
Added Google Sheets v4 cell parsing and URL utilities, Google Forms scopes, and YouTube short URL conversion.
Highlights¶
- New
sheetsutil/v4cell value parsing with typed cell representation - Spreadsheet URL parsing and building utilities
- Google Forms OAuth scopes helpers
- YouTube short URL conversion utility
New Features¶
sheetsutil/v4 Cell Parsing¶
Parse Google Sheets API responses into typed Go structures:
import sheetsutil "github.com/grokify/gogoogle/sheetsutil/v4"
// Parse ValueRange to typed grid
grid := sheetsutil.ParseValueRange(valueRange)
// Each cell has type information
for _, row := range grid {
for _, cell := range row {
switch cell.Type {
case sheetsutil.CellTypeString:
fmt.Println(*cell.StringValue)
case sheetsutil.CellTypeNumber:
fmt.Println(*cell.NumberValue)
case sheetsutil.CellTypeBool:
fmt.Println(*cell.BoolValue)
}
}
}
// Or extract as simple strings
values := sheetsutil.ExtractFormattedValues(valueRange) // Display values
raw := sheetsutil.ExtractRawValues(valueRange) // Underlying values
sheetsutil/v4 URL Utilities¶
Parse and build Google Sheets URLs:
import sheetsutil "github.com/grokify/gogoogle/sheetsutil/v4"
// Extract spreadsheet ID from URL or plain ID
id, err := sheetsutil.ParseSpreadsheetURL("https://docs.google.com/spreadsheets/d/abc123/edit#gid=0")
// id = "abc123"
// Extract full info including sheet GID and range
info, err := sheetsutil.ParseSpreadsheetURLFull("https://docs.google.com/spreadsheets/d/abc123/edit#gid=456&range=A1:D10")
// info.SpreadsheetID = "abc123"
// info.SheetGID = 456
// info.Range = "A1:D10"
// Build URLs
url := sheetsutil.BuildSpreadsheetURL("abc123")
// url = "https://docs.google.com/spreadsheets/d/abc123/edit"
url := sheetsutil.BuildSpreadsheetURLWithSheet("abc123", 456)
// url = "https://docs.google.com/spreadsheets/d/abc123/edit#gid=456"
forms/v1 Scopes¶
Helper functions for Google Forms API OAuth scopes:
import forms "github.com/grokify/gogoogle/forms/v1"
// All Forms scopes (Drive, DriveFile, FormsBody, FormsResponsesReadonly)
scopes := forms.ScopesAll()
// Read-only scopes
scopes := forms.ScopesReadOnly()
// As client option
opt := forms.ClientOptionScopesAll()
youtubeutil Short URLs¶
Convert YouTube video URLs to short format:
import "github.com/grokify/gogoogle/youtubeutil"
// Convert long URL to short
shortURL, err := youtubeutil.ShortURL("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
// shortURL = "https://youtu.be/dQw4w9WgXcQ"
// Also accepts video ID directly
shortURL, err := youtubeutil.ShortURL("dQw4w9WgXcQ")
// shortURL = "https://youtu.be/dQw4w9WgXcQ"
Documentation¶
- Enhanced
sheetsutil/v4/sheetsmapREADME with comprehensive usage guide - Added Iwark Spreadsheet instantiation guide in examples