We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dedc832 commit 4070befCopy full SHA for 4070bef
1 file changed
README.md
@@ -75,15 +75,15 @@ enum DeepLink {
75
// ✅ Valid URLs
76
DeepLink(url: URL(string: "/posts/1")!) == .post(postId: "1")
77
DeepLink(url: URL(string: "/posts/1/comments/2")!) == .postComment(postId: "1", commentId: "2")
78
-DeepLink(url: URL(string: "/f/1/s/2")!) == .postComment(second: 2, first: 1)
+DeepLink(url: URL(string: "/f/1/s/2")!) == .reverse(second: 2, first: 1)
79
80
// ❌ Invalid URLs
81
DeepLink(url: URL(string: "/post/1")!) == nil
82
DeepLink(url: URL(string: "/posts/1/comments")!) == nil
83
DeepLink(url: URL(string: "/f/string/s/string")!) == nil
84
```
85
4. Use the `Enum.init(url: URL)` generated initializer.
86
-```
+```swift
87
if let deepLink = DeepLink(url: incomingURL) {
88
switch deepLink {
89
case .post(let postId):
0 commit comments