MCPcopy Create free account
hub / github.com/GoogleChrome/webstatus.dev / decodeInputFeatureResultCursor

Function decodeInputFeatureResultCursor

lib/gcpspanner/client.go:286–299  ·  view source on GitHub ↗

decodeInputFeatureResultCursor provides a wrapper around the generic decodeCursor.

(
	cursor string)

Source from the content-addressed store, hash-verified

284
285// decodeInputFeatureResultCursor provides a wrapper around the generic decodeCursor.
286func decodeInputFeatureResultCursor(
287 cursor string) (*FeatureResultOffsetCursor, error) {
288 // Try for the offset based cursor
289 offsetCursor, err := decodeCursor[FeatureResultOffsetCursor](cursor)
290 if err != nil {
291 return nil, err
292 }
293
294 if offsetCursor == nil || offsetCursor.Offset < 0 {
295 return nil, ErrInvalidCursorFormat
296 }
297
298 return offsetCursor, nil
299}
300
301// decodeChromeDailyUsageCursor provides a wrapper around the generic decodeCursor.
302func decodeChromeDailyUsageCursor(

Callers 1

FeaturesSearchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected