Created
November 7, 2018 03:21
-
-
Save LucianoPAlmeida/8f9b538d71e7abb546eb42d68e417a65 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Environment { | |
static var mySecretKey: String = Environment.variable(named: "SECRET_ENVIRONMENT_KEY") ?? CI.mySecretKey | |
static func variable(named name: String) -> String? { | |
let processInfo = ProcessInfo.processInfo | |
guard let value = processInfo.environment[name] else { | |
return nil | |
} | |
return value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment