diff --git a/examples/regular-expressions/regular-expressions.hash b/examples/regular-expressions/regular-expressions.hash index a1d5644..bffd787 100644 --- a/examples/regular-expressions/regular-expressions.hash +++ b/examples/regular-expressions/regular-expressions.hash @@ -1,2 +1,2 @@ -3db643ab821ee2a5b70e05fbadbde1a7f7ba1591 -944r7pT2YIl +c0dd720036ac70269ce233bf47c5d6aefd43161f +LEKGY_d3Nu_P diff --git a/public/regular-expressions b/public/regular-expressions index 7a312eb..ec33157 100644 --- a/public/regular-expressions +++ b/public/regular-expressions @@ -43,7 +43,7 @@ in Go.
package main
When creating constants with regular expressions
-you can use the MustCompile
variation of
-Compile
. A plain Compile
won’t work for
-constants because it has 2 return values.
When creating global variables with regular
+expressions you can use the MustCompile
variation
+of Compile
. MustCompile
panics instead of
+returning an error, which makes it safer to use for
+global variables.