Skip to content

Instantly share code, notes, and snippets.

View taglia3's full-sized avatar

Matteo Tagliafico taglia3

  • Reply
  • Turin
View GitHub Profile
@mhuusko5
mhuusko5 / Swift – func deepDescription
Last active November 3, 2022 16:26
Swift – func deepDescription(any: Any) -> String (pretty print any object, recursively)
func deepDescription(any: Any) -> String {
guard let any = deepUnwrap(any) else {
return "nil"
}
if any is Void {
return "Void"
}
if let int = any as? Int {
public struct Credentials {
public init(key: String, secret: String) {
self.key = key
self.secret = secret
}
public let key: String
public let secret: String
}