isValid returns true if and only if s can be read fully without error by anyio and contains at least one value.
(s string)
| 103 | // isValid returns true if and only if s can be read fully without error by |
| 104 | // anyio and contains at least one value. |
| 105 | func isValid(s string) bool { |
| 106 | zrc, err := anyio.NewReader(super.NewContext(), strings.NewReader(s), anyio.ReaderOpts{}) |
| 107 | if err != nil { |
| 108 | return false |
| 109 | } |
| 110 | defer zrc.Close() |
| 111 | var foundValue bool |
| 112 | for { |
| 113 | val, err := zrc.Read() |
| 114 | if err != nil { |
| 115 | return false |
| 116 | } |
| 117 | if val == nil { |
| 118 | return foundValue |
| 119 | } |
| 120 | foundValue = true |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | func runAllBoomerangs(t *testing.T, format string, data map[string]string) { |
| 125 | t.Run(format, func(t *testing.T) { |
no test coverage detected