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

Function writeToFile

api/shared/wrap_for_cf_on_k8s_test.go:448–455  ·  view source on GitHub ↗
(base64Data string)

Source from the content-addressed store, hash-verified

446}
447
448func writeToFile(base64Data string) string {
449 file, err := os.CreateTemp("", "")
450 Expect(err).NotTo(HaveOccurred())
451 _, err = file.WriteString(base64Decode(base64Data))
452 Expect(err).NotTo(HaveOccurred())
453 Expect(file.Close()).To(Succeed())
454 return file.Name()
455}
456
457func execCredential(status *clientauthenticationv1beta1.ExecCredentialStatus) string {
458 execCred, err := json.Marshal(clientauthenticationv1beta1.ExecCredential{

Callers 1

Calls 3

NameMethod · 0.80
base64DecodeFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected