FAQ
Reviewers: golang-dev1,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go


Description:
spec: fix small error

also gofmt samples

Please review this at https://codereview.appspot.com/14227043/

Affected files (+4, -4 lines):
    M doc/go_spec.html


Index: doc/go_spec.html
===================================================================
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,6 +1,6 @@
   <!--{
    "Title": "The Go Programming Language Specification",
- "Subtitle": "Version of Sep 16, 2013",
+ "Subtitle": "Version of Oct 1, 2013",
    "Path": "/doc/spec"
   }-->

@@ -2671,9 +2671,9 @@
   </p>

   <pre>
-a[2:] // same a[2 : len(a)]
-a[:3] // same as a[0 : 3]
-a[:] // same as a[0 : len(a)]
+a[2:] // same as a[2:len(a)]
+a[:3] // same as a[0:3]
+a[:] // same as a[0:len(a)]
   </pre>

   <p>


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Andrey mirtchovski at Oct 1, 2013 at 7:13 pm
    i think the spaces are intentional. a lot of thought has gone into
    indenting the reslicing operator in Go: gofmt will remove spaces
    around ":" if both sides are constants ([0:3]) or simple function
    calls ([0:len(a)]), but to aid clarity, gofmt will insert spaces
    around ":" if there are any arithmetic operations involved. but even
    though gofmt will remove spaces if it saw this in real code, it
    doesn't touch comments.

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Rh at Oct 1, 2013 at 7:22 pm
    That's a fair point. I was originally in there just to fix the missing
    'as'. I will defer to the group consensus.
    On Tuesday, October 1, 2013 2:13:11 PM UTC-5, andrey mirtchovski wrote:

    i think the spaces are intentional. a lot of thought has gone into
    indenting the reslicing operator in Go: gofmt will remove spaces
    around ":" if both sides are constants ([0:3]) or simple function
    calls ([0:len(a)]), but to aid clarity, gofmt will insert spaces
    around ":" if there are any arithmetic operations involved. but even
    though gofmt will remove spaces if it saw this in real code, it
    doesn't touch comments.
    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 1, '13 at 6:42p
activeOct 1, '13 at 7:22p
posts3
users2
websitegolang.org

2 users in discussion

Rh: 2 posts Andrey mirtchovski: 1 post

People

Translate

site design / logo © 2022 Grokbase