MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / IsRevTreeID

Function IsRevTreeID

base/util.go:1834–1846  ·  view source on GitHub ↗

IsRevTreeID checks if the string looks like a RevTree ID.

(s string)

Source from the content-addressed store, hash-verified

1832
1833// IsRevTreeID checks if the string looks like a RevTree ID.
1834func IsRevTreeID(s string) bool {
1835 // If we scan forwards past each digit until we hit `-`, we know this is a RevTree ID.
1836 for i, r := range s {
1837 if r >= '0' && r <= '9' {
1838 continue
1839 }
1840 if r == '-' && i > 0 {
1841 return true
1842 }
1843 break
1844 }
1845 return false
1846}
1847
1848// GetStackTrace will return goroutine stack traces for all goroutines in Sync Gateway.
1849func GetStackTrace() (bytes.Buffer, error) {

Callers 11

handleGetDocMethod · 0.92
handleChangesMethod · 0.92
sendRevisionsMethod · 0.92
sendRevisionMethod · 0.92
getKnownRevsMethod · 0.92
GetDeltaMethod · 0.92
parseIncomingChangeFunction · 0.92
processRevMethod · 0.92
TestIsRevTreeIDFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsRevTreeIDFunction · 0.68