Similar to strings.Cut in Go 1.18, but sep can only be 1 byte.
(s string, sep byte)
| 592 | |
| 593 | // Similar to strings.Cut in Go 1.18, but sep can only be 1 byte. |
| 594 | func 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. |
| 602 | func (c *Client) Set(item *Item) error { |
no outgoing calls
no test coverage detected