File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1284,18 +1284,18 @@ func (re *Regexp) Split(s string, n int) []string {
1284
1284
return strings
1285
1285
}
1286
1286
1287
- // MarshalText implements the encoding.TextMarshaler interface . The output
1287
+ // MarshalText implements [ encoding.TextMarshaler] . The output
1288
1288
// matches that of calling the [Regexp.String] method.
1289
1289
//
1290
1290
// Note that the output is lossy in some cases: This method does not indicate
1291
- // POSIX regular expressions (i.e. those compiled by calling CompilePOSIX), or
1291
+ // POSIX regular expressions (i.e. those compiled by calling [ CompilePOSIX] ), or
1292
1292
// those for which the [Regexp.Longest] method has been called.
1293
1293
func (re * Regexp ) MarshalText () ([]byte , error ) {
1294
1294
return []byte (re .String ()), nil
1295
1295
}
1296
1296
1297
- // MarshalText implements the encoding.TextUnmarshaler interface by calling
1298
- // Compile on the encoded value.
1297
+ // UnmarshalText implements [ encoding.TextUnmarshaler] by calling
1298
+ // [ Compile] on the encoded value.
1299
1299
func (re * Regexp ) UnmarshalText (text []byte ) error {
1300
1300
newRE , err := Compile (string (text ))
1301
1301
if err != nil {
You can’t perform that action at this time.
0 commit comments