参考:https://collectiveidea.com/blog/archives/2014/10/01/simple-cocoa-configuration-using-swift-structures
// Nested Configuration Example
struct Config {
static let maxConnections = 10
struct faceBook {
static let secret = "12341234"
static let key = "ABCD"
}
struct twitter {
static let secret = "9887"
static let key = "9723"
}
}
Config.maxConnections // 10
Config.faceBook.secret // "12341234"
Config.faceBook.key // "ABCD"
Config.twitter.secret // "9887"
Config.twitter.key // "9723"