(val *super.Value)
| 385 | } |
| 386 | |
| 387 | func decodeStrings(val *super.Value) ([]string, error) { |
| 388 | typ := super.TypeUnder(val.Type()) |
| 389 | if inner := super.InnerType(typ); inner != nil { |
| 390 | if inner.ID() != super.IDString { |
| 391 | return nil, errors.New("array elements of header field must be strings") |
| 392 | } |
| 393 | var out []string |
| 394 | for it := val.ContainerIter(); !it.Done(); { |
| 395 | out = append(out, super.DecodeString(it.Next())) |
| 396 | } |
| 397 | return out, nil |
| 398 | } |
| 399 | if typ != super.TypeString { |
| 400 | return nil, errors.New("header field value must be a string or an array or set of strings") |
| 401 | } |
| 402 | return []string{val.AsString()}, nil |
| 403 | } |
| 404 | |
| 405 | func (t *translator) fromPoolRegexp(node ast.Node, re, orig, which string, args []ast.OpArg) sem.Seq { |
| 406 | poolNames, err := t.matchPools(re, orig, which) |
no test coverage detected