Need to edit the template file. Both that and generated HTML go in the CL. ...
13 years, 3 months ago
(2012-01-25 03:22:23 UTC)
#2
Need to edit the template file. Both that and generated HTML go in the CL.
On Jan 24, 2012 7:17 PM, <n13m3y3r@gmail.com> wrote:
> Reviewers: golang-dev_googlegroups.com,
>
> Message:
> Hello golang-dev@googlegroups.com,
>
> I'd like you to review this change to
> https://go.googlecode.com/hg/
>
>
> Description:
> doc/go1: add net/url changes
>
> Please review this at
http://codereview.appspot.com/**5575056/<http://codereview.appspot.com/5575056/>
>
> Affected files:
> M doc/go1.html
>
>
> Index: doc/go1.html
> ==============================**==============================**=======
> --- a/doc/go1.html
> +++ b/doc/go1.html
> @@ -1410,6 +1410,91 @@
> or <code>panic</code> should be updated to use the new methods.
> </p>
>
> +<h3 id="url">The url package</h3>
> +
> +<p>
> +In Go 1 the <a href="/net/url#URL"><code>url.**URL</code></a> type has
> +been simplified. The changes avoid duplication of information on
> +multiple fields and enable modifications made to an existing value
> +to have clear effects. More specific details follow.
> +</p>
> +
> +<p>
> +The <a href="/net/url#URL.String"><**code>String</code></a> method now
> +predictably rebuilds an encoded URL string using all of <code>URL</code>'s
> +fields as necessary. The resulting string will also no longer have
> +passwords escaped.
> +</p>
> +
> +<p>
> +The <code>Raw</code> field has been removed. In most cases the
> <code>String</code>
> +method may be used in its place.
> +</p>
> +
> +<p>
> +The <code>RawUserinfo</code> field was replaced by the <code>User</code>
> +field, of type <a href="/net/url#Userinfo"><**
> code>*net.Userinfo</code></a>.
> +Values of this type may be created using the new <a
> href="/net/url#User"><code>**net.User</code></a>
> +and <a href="/net/url#UserPassword"><**code>net.UserPassword</code></**a>
> +functions. Functions <code>EscapeUserinfo</code> and
> <code>UnescapeUserinfo</code>
> +that were used to manipulate the old field were removed too.
> +</p>
> +
> +<p>
> +The <code>RawAuthority</code> field has been removed. The same
> information is
> +available in the <code>Host</code> and <code>User</code> fields.
> +</p>
> +
> +<p>
> +The <code>RawPath</code> field and the <code>EncodedPath</code> method
> have
> +been removed. The path information in rooted URLs (with a slash following
> the
> +schema) is now available only in decoded form in the <code>Path</code>
> field.
> +In some less usual cases, the encoded data might be required to obtain
> +information that was lost in the decoding process. These cases must be
> handled
> +by accessing the data the URL was built from.
> +</p>
> +
> +<p>
> +URLs with non-rooted paths, such as <code>"mailto:dev@golang.org?**
> subject=Hi"</code>,
> +are also handled differently. The <code>OpaquePath</code> boolean field
> has been
> +removed and a new <code>Opaque</code> string field introduced to hold the
> encoded
> +path for such URLs. Also, the way in which these URLs are taken apart has
> changed.
> +Previously, the cited URL would parse as:
> +</p>
> +
> +<pre>
> + URL{
> + Raw: "mailto:dev@golang.org?**subject=Hi",
> + Scheme: "mailto",
> + OpaquePath: true,
> + RawPath: "dev@golang.org?subject=Hi",
> + Path:"dev@golang.org?subject=**Hi<http://dev@golang.org?subject=Hi>
> ",
> + }
> +</pre>
> +
> +<p>
> +In Go 1, the same URL parses as:
> +</p>
> +
> +<pre>
> + URL{
> + Scheme: "mailto",
> + Opaque: "dev@golang.org",
> + RawQuery: "subject=Hi",
> + }
> +</pre>
> +
> +<p>
> +A new <a href="/net/url#URL.RequestURI"**><code>RequestURI</code></a>
> method was
> +added to <code>URL</code>.
> +</p>
> +
> +<p>
> +<em>Updating</em>:
> +Code that uses the old fields will fail to compile and must be updated by
> hand.
> +The semantic changes make it difficult for gofix to update automatically.
> +</p>
> +
> <h2 id="go_command">The go command</h2>
>
> <h2 id="releases">Packaged releases</h2>
>
>
>
> the picture's a bit lost in all the prose. would it make sense to ...
13 years, 3 months ago
(2012-01-25 22:42:11 UTC)
#6
> the picture's a bit lost in all the prose. would it make sense to have a
> executable example? that's a question, not a request.
I'm not entirely sure. A lot was removed, and it may be a bit hard to see what
is _not_ there in the example. I've fixed your requests, and will think about
that further.
LGTM after fixing and testing links. thanks http://codereview.appspot.com/5575056/diff/8002/doc/go1.tmpl File doc/go1.tmpl (right): http://codereview.appspot.com/5575056/diff/8002/doc/go1.tmpl#newcode1306 doc/go1.tmpl:1306: In Go ...
13 years, 3 months ago
(2012-01-26 00:37:55 UTC)
#8
Issue 5575056: code review 5575056: doc/go1: add net/url changes
(Closed)
Created 13 years, 3 months ago by niemeyer
Modified 13 years, 3 months ago
Reviewers:
Base URL:
Comments: 6