MCPcopy
hub / github.com/bradfitz/gomemcache / cut

Function cut

memcache/memcache.go:594–599  ·  view source on GitHub ↗

Similar to strings.Cut in Go 1.18, but sep can only be 1 byte.

(s string, sep byte)

Source from the content-addressed store, hash-verified

592
593// Similar to strings.Cut in Go 1.18, but sep can only be 1 byte.
594func cut(s string, sep byte) (before, after string, found bool) {
595 if i := strings.IndexByte(s, sep); i >= 0 {
596 return s[:i], s[i+1:], true
597 }
598 return s, "", false
599}
600
601// Set writes the given item, unconditionally.
602func (c *Client) Set(item *Item) error {

Callers 1

scanGetResponseLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected