1
0
mirror of https://github.com/golang/go synced 2024-11-24 02:20:18 -07:00

doc/go1: minor html fixes

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5572064
This commit is contained in:
Robert Hencke 2012-01-25 21:09:46 -08:00 committed by Rob Pike
parent f8a28ecc9f
commit 7c9ee5f369
2 changed files with 8 additions and 8 deletions

View File

@ -74,8 +74,8 @@ to call <code>close</code> on a receive-only channel:
<pre>
var c chan int
var csend chan<- int = c
var crecv <-chan int = c
var csend chan&lt;- int = c
var crecv &lt;-chan int = c
close(c) // legal
close(csend) // legal
close(crecv) // illegal
@ -328,8 +328,8 @@ This function implicitly returns a shadowed return value and will be rejected by
<pre>
func Bug() (i, j, k int) {
for i = 0; i < 5; i++ {
for j := 0; j < 5; j++ { // Redeclares j.
for i = 0; i &lt; 5; i++ {
for j := 0; j &lt; 5; j++ { // Redeclares j.
k += i*j
if k > 100 {
return // Rejected: j is shadowed here.

View File

@ -67,8 +67,8 @@ to call <code>close</code> on a receive-only channel:
<pre>
var c chan int
var csend chan<- int = c
var crecv <-chan int = c
var csend chan&lt;- int = c
var crecv &lt;-chan int = c
close(c) // legal
close(csend) // legal
close(crecv) // illegal
@ -263,8 +263,8 @@ This function implicitly returns a shadowed return value and will be rejected by
<pre>
func Bug() (i, j, k int) {
for i = 0; i < 5; i++ {
for j := 0; j < 5; j++ { // Redeclares j.
for i = 0; i &lt; 5; i++ {
for j := 0; j &lt; 5; j++ { // Redeclares j.
k += i*j
if k > 100 {
return // Rejected: j is shadowed here.