| 111 | } |
| 112 | |
| 113 | type byteViewSink struct { |
| 114 | dst *ByteView |
| 115 | |
| 116 | // if this code ever ends up tracking that at least one set* |
| 117 | // method was called, don't make it an error to call set |
| 118 | // methods multiple times. Lorry's payload.go does that, and |
| 119 | // it makes sense. The comment at the top of this file about |
| 120 | // "exactly one of the Set methods" is overly strict. We |
| 121 | // really care about at least once (in a handler), but if |
| 122 | // multiple handlers fail (or multiple functions in a program |
| 123 | // using a Sink), it's okay to re-use the same one. |
| 124 | } |
| 125 | |
| 126 | func (s *byteViewSink) setView(v ByteView) error { |
| 127 | *s.dst = v |
nothing calls this directly
no outgoing calls
no test coverage detected