File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 62
62
Keep in mind that ` match!/2 ` throws an ArgumentError when you pass in a value
63
63
that does not represent a valid IP address or when you try to match an IPv4
64
64
address with an IPv6 range and vice-versa. We also provide ` match/2 ` , a non-
65
- throwing interface that returns tagged tuples.
65
+ throwing interface that returns tagged tuples:
66
+
67
+ ``` elixir
68
+ iex (8 )> cidr |> CIDR .match (" 1.2.3.100" )
69
+ {:ok , true }
70
+ iex (9 )> cidr |> CIDR .match (" 1.2.4.1" )
71
+ {:ok , false }
72
+ iex (10 )> cidr |> CIDR .match (" 1.2.3.1000" )
73
+ {:error , " Tuple is not a valid IP address." }
74
+ ```
66
75
67
76
## Contribution Process
68
77
@@ -77,7 +86,7 @@ code changes.
77
86
1 . Check for [ open issues] ( https://github.com/c-rack/cidr-elixir/issues ) or
78
87
[ open a new issue] ( https://github.com/c-rack/cidr-elixir/issues/new ) to start
79
88
a discussion around a feature idea or a bug.
80
- 2 . Fork the [ cidr-elixir repository on Github ] ( https://github.com/c-rack/cidr-elixir )
89
+ 2 . Fork the [ cidr-elixir repository on GitHub ] ( https://github.com/c-rack/cidr-elixir )
81
90
to start making your changes.
82
91
3 . Write a test which shows that the bug was fixed or that the feature works as
83
92
expected
You can’t perform that action at this time.
0 commit comments