Created
September 25, 2017 14:46
-
-
Save rldaulton/69ba7f292a631445f3dd7ea483fa9d94 to your computer and use it in GitHub Desktop.
Project Management with Global Enums
This file contains 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
enum Environment { | |
case development | |
case staging | |
case production | |
} | |
let environment: Environment = .development | |
switch environment { | |
case .development: | |
// set web service URL to development | |
// set API keys to development | |
print("It's for development") | |
case .staging: | |
// set web service URL to staging | |
// set API keys to development | |
print("It's for staging") | |
case .production: | |
// set web service URL to production | |
// set API keys to production | |
print("It's for production") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment