Type Method
load(path:fileio:logger:)
Reads the dotenv files relevant to the environment and loads them into the process.
static func load(path: String, fileio: NonBlockingFileIO, logger: Logger = Logger(label: "dot-env-loggger")) async
Parameters
pathAbsolute or relative path of the dotenv file.
fileioNonBlockingFileIO that is used to read the .env file(s).
loggerOptionally provide an existing logger.
Discussion
let path: String
let fileio: NonBlockingFileIO
let logger: Logger
try DotEnvFile.load(path: path, fileio: filio, logger: logger)
print(Environment.process.FOO) // BAR