(file string)
| 169 | } |
| 170 | |
| 171 | func readPemFile(file string) ([]byte, error) { |
| 172 | bytes, err := readFile(file) |
| 173 | if err != nil { |
| 174 | return nil, errors.Wrapf(err, "reading from file %s failed", file) |
| 175 | } |
| 176 | |
| 177 | b, _ := pem.Decode(bytes) |
| 178 | if b == nil { |
| 179 | return nil, errors.Errorf("no pem content for file %s", file) |
| 180 | } |
| 181 | |
| 182 | return bytes, nil |
| 183 | } |
no test coverage detected