From: Rob Pike Date: Mon, 27 Feb 2012 03:34:16 +0000 (+1100) Subject: doc/go1: mention that regexp has changed X-Git-Tag: weekly.2012-03-04~139 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cc7e11c91ebb9d30b260cf92e66e94f3217b45e6;p=gostls13.git doc/go1: mention that regexp has changed Also restore alphabetical order. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5701053 --- diff --git a/doc/go1.html b/doc/go1.html index 3309a40730..75a309fe9e 100644 --- a/doc/go1.html +++ b/doc/go1.html @@ -1702,6 +1702,39 @@ Code that uses the old POSIX error values from the os package will fail to compile and will also need to be updated by hand.

+

The os/signal package

+ +

+The os/signal package in Go 1 replaces the +Incoming function, which returned a channel +that received all incoming signals, +with the selective Notify function, which asks +for delivery of specific signals on an existing channel. +

+ +

+Updating: +Code must be updated by hand. +A literal translation of +

+
+c := signal.Incoming()
+
+

+is +

+
+c := make(chan os.Signal)
+signal.Notify(c) // ask for all signals
+
+

+but most code should list the specific signals it wants to handle instead: +

+
+c := make(chan os.Signal)
+signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
+
+

The path/filepath package

@@ -1747,38 +1780,19 @@ will need to be updated by hand. The compiler will catch code using the old interface.

-

The os/signal package

+

The regexp package

-The os/signal package in Go 1 replaces the -Incoming function, which returned a channel -that received all incoming signals, -with the selective Notify function, which asks -for delivery of specific signals on an existing channel. +The regexp package has been rewritten. +It has the same interface but the specification of the regular expressions +it supports has changed from the old "egrep" form to that of +RE2.

Updating: -Code must be updated by hand. -A literal translation of +Code that uses the package should have its regular expressions checked by hand.

-
-c := signal.Incoming()
-
-

-is -

-
-c := make(chan os.Signal)
-signal.Notify(c) // ask for all signals
-
-

-but most code should list the specific signals it wants to handle instead: -

-
-c := make(chan os.Signal)
-signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
-

The runtime package

diff --git a/doc/go1.tmpl b/doc/go1.tmpl index e3c6ea999d..6551daefd2 100644 --- a/doc/go1.tmpl +++ b/doc/go1.tmpl @@ -1601,6 +1601,39 @@ Code that uses the old POSIX error values from the os package will fail to compile and will also need to be updated by hand.

+

The os/signal package

+ +

+The os/signal package in Go 1 replaces the +Incoming function, which returned a channel +that received all incoming signals, +with the selective Notify function, which asks +for delivery of specific signals on an existing channel. +

+ +

+Updating: +Code must be updated by hand. +A literal translation of +

+
+c := signal.Incoming()
+
+

+is +

+
+c := make(chan os.Signal)
+signal.Notify(c) // ask for all signals
+
+

+but most code should list the specific signals it wants to handle instead: +

+
+c := make(chan os.Signal)
+signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
+
+

The path/filepath package

@@ -1632,38 +1665,19 @@ will need to be updated by hand. The compiler will catch code using the old interface.

-

The os/signal package

+

The regexp package

-The os/signal package in Go 1 replaces the -Incoming function, which returned a channel -that received all incoming signals, -with the selective Notify function, which asks -for delivery of specific signals on an existing channel. +The regexp package has been rewritten. +It has the same interface but the specification of the regular expressions +it supports has changed from the old "egrep" form to that of +RE2.

Updating: -Code must be updated by hand. -A literal translation of +Code that uses the package should have its regular expressions checked by hand.

-
-c := signal.Incoming()
-
-

-is -

-
-c := make(chan os.Signal)
-signal.Notify(c) // ask for all signals
-
-

-but most code should list the specific signals it wants to handle instead: -

-
-c := make(chan os.Signal)
-signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT)
-

The runtime package