可授权的

用于导出许可证信息的轻量级 Swift API

用法

extension Licensable where Self == License {

  public static var interact: License {

    let licenseURL = Bundle.module.url(forResource: "LICENSE", withExtension: nil)!

    return License(id: "https://github.com/inseven/interact",
                   name: Package.name,
                   author: Package.author,
                   text: try! String(contentsOf: licenseURL),
                   attributes: [
                     .url(URL(string: "https://github.com/inseven/interact")!, 
                        title: "GitHub"),
                   ],
                   licenses: [
                     .licensable,
                   ])
  }

}

许可证

Licensable 采用 MIT 许可证授权(请参阅 LICENSE)。