ArgsToDict

Swift 库,用于将命令行参数转换为字典

⚙️ 安装

.package(url: "http://github.com/aniket965/ArgsToDict.git", from: "1.0.0")

📗 用法

import Foundation
import ArgsToDict

let args = argsToDict(args: CommandLine.arguments)

📃示例

let args = argsToDict(args: ["init","-type","executable"])
// args -> ["type": "executable", "_": ["init"]]

许可证

MIT © Aniket965