Skip to content

Instantly share code, notes, and snippets.

@AppleCEO
Created August 22, 2025 11:50
Show Gist options
  • Save AppleCEO/c194f899d7ffacdc9fa86757d4b8b2cf to your computer and use it in GitHub Desktop.
Save AppleCEO/c194f899d7ffacdc9fa86757d4b8b2cf to your computer and use it in GitHub Desktop.
enum Stage: String {
case production
case staging
case dev
case local
init?(rawValue: String) {
switch rawValue.lowercased() {
case "prod", "production": self = .production
case "qa", "staging": self = .staging
case "dev": self = .dev
case "local": self = .local
default: return nul
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment