MetadataAsStringSlice parses the Response metadata into a slice of string.
()
| 65 | |
| 66 | // MetadataAsStringSlice parses the Response metadata into a slice of string. |
| 67 | func (r *Response) MetadataAsStringSlice() ([]string, error) { |
| 68 | sl := []string{} |
| 69 | err := r.MetadataAsStruct(&sl) |
| 70 | if err != nil { |
| 71 | return nil, err |
| 72 | } |
| 73 | |
| 74 | return sl, nil |
| 75 | } |
| 76 | |
| 77 | // MetadataAsStruct parses the Response metadata into a provided struct. |
| 78 | func (r *Response) MetadataAsStruct(target any) error { |
nothing calls this directly
no test coverage detected