def read_cred2

cswap-bend-cli@0.1.0.0 · store/io.bend:100

import cswap-bend-cli@0.1.0.0/store/io.bend as Io
import Base
import cswap-bend-cli@0.1.0.0/b64.bend as B64
import cswap-bend-cli@0.1.0.0/fs.bend as Fs
import cswap-bend-cli@0.1.0.0/act.bend as Act

100def read_cred2(+ex: Bool, +path: String) -> Act.of(String):
101  match ex:
102    case False{}:
103      Act.pure(String, "")
104    case True{}:
105      do ActM<String>:
106        text : String <- Fs.read_file(path)
107        return decoded(B64.decode(String.trim(text)))

Uses (11)

Used by (1)