BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe base64 without padding, are separated by 'sep' into a slice of byte slices.
(val, sep string)
| 192 | // BytesSlice converts 'val' where individual bytes sequences, encoded in URL-safe |
| 193 | // base64 without padding, are separated by 'sep' into a slice of byte slices. |
| 194 | func BytesSlice(val, sep string) ([][]byte, error) { |
| 195 | s := strings.Split(val, sep) |
| 196 | values := make([][]byte, len(s)) |
| 197 | for i, v := range s { |
| 198 | value, err := Bytes(v) |
| 199 | if err != nil { |
| 200 | return nil, err |
| 201 | } |
| 202 | values[i] = value |
| 203 | } |
| 204 | return values, nil |
| 205 | } |
| 206 | |
| 207 | // Timestamp converts the given RFC3339 formatted string into a timestamp.Timestamp. |
| 208 | func Timestamp(val string) (*timestamppb.Timestamp, error) { |
no test coverage detected