MCPcopy
hub / github.com/cloudfoundry/cli / pemDecodeKubeConfigCertData

Function pemDecodeKubeConfigCertData

api/shared/wrap_for_cf_on_k8s_test.go:434–440  ·  view source on GitHub ↗
(data string)

Source from the content-addressed store, hash-verified

432})
433
434func pemDecodeKubeConfigCertData(data string) *pem.Block {
435 decodedData, err := base64.StdEncoding.DecodeString(data)
436 Expect(err).NotTo(HaveOccurred())
437 pemDecodedBlock, rest := pem.Decode(decodedData)
438 Expect(rest).To(BeEmpty())
439 return pemDecodedBlock
440}
441
442func base64Decode(encoded string) string {
443 decoded, err := base64.StdEncoding.DecodeString(encoded)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected