Skip to content

Instantly share code, notes, and snippets.

@YuriNachos
Created September 23, 2017 18:51
Show Gist options
  • Select an option

  • Save YuriNachos/185c6ad54c7848d4381ebf11b75cb80e to your computer and use it in GitHub Desktop.

Select an option

Save YuriNachos/185c6ad54c7848d4381ebf11b75cb80e to your computer and use it in GitHub Desktop.
Env
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