Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
edc7b473
Commit
edc7b473
authored
Aug 07, 2012
by
Shenghou Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: fix some HTML syntax errors
R=adg CC=golang-dev
https://golang.org/cl/6458043
parent
0cb04168
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
10 deletions
+10
-10
doc/articles/concurrency_patterns.html
doc/articles/concurrency_patterns.html
+1
-1
doc/articles/image_package.html
doc/articles/image_package.html
+4
-4
doc/articles/json_rpc_tale_of_interfaces.html
doc/articles/json_rpc_tale_of_interfaces.html
+1
-1
doc/code.html
doc/code.html
+1
-1
doc/install.html
doc/install.html
+3
-3
No files found.
doc/articles/concurrency_patterns.html
View file @
edc7b473
...
...
@@ -17,7 +17,7 @@ and launching a goroutine that sleeps before sending on the channel:
We can then use a
<code>
select
</code>
statement to receive from either
<code>
ch
</code>
or
<code>
timeout
</code>
. If nothing arrives on
<code>
ch
</code>
after one second, the timeout case is selected and the attempt to read from
<c
de>
ch
</c
de>
is abandoned.
<c
ode>
ch
</co
de>
is abandoned.
</p>
{{code "/doc/progs/timeout1.go" `/select {/` `/STOP/`}}
...
...
doc/articles/image_package.html
View file @
edc7b473
...
...
@@ -45,7 +45,7 @@ classic algebra:
dstr, dstg, dstb, dsta := dst.RGBA()
srcr, srcg, srcb, srca := src.RGBA()
_, _, _, m := mask.RGBA()
const M = 1
<
<
16
-
1
const M = 1
<<
16 - 1
// The resultant red value is a blend of dstr and srcr, and ranges in [0, M].
// The calculation for green, blue and alpha is similar.
dstr = (dstr*(M-m) + srcr*m) / M
...
...
@@ -130,7 +130,7 @@ much easier to type.
A
<code>
Rectangle
</code>
is inclusive at the top-left and exclusive at the
bottom-right. For a
<code>
Point p
</code>
and a
<code>
Rectangle r
</code>
,
<code>
p.In(r)
</code>
if and only if
<code>
r.Min.X
<
=
p
.
X
&&
p
.
X
<
r
.
Max
.
X
</
code
>
, and similarly for
<code>
Y
</code>
. This is analagous to how
<code>
r.Min.X
<
= p.X
&&
p.X
<
r.Max.X
</code>
, and similarly for
<code>
Y
</code>
. This is analagous to how
a slice
<code>
s[i0:i1]
</code>
is inclusive at the low end and exclusive at the
high end. (Unlike arrays and slices, a
<code>
Rectangle
</code>
often has a
non-zero origin.)
...
...
@@ -193,8 +193,8 @@ way to iterate over an <code>Image</code> m's pixels looks like:
<pre>
b := m.Bounds()
for y := b.Min.Y; y
<
b
.
Max
.
Y
;
y
++
{
for
x
:=
b.Min.X;
y
<
b
.
Max
.
X
;
x
++
{
for y := b.Min.Y; y
<
b.Max.Y; y++ {
for x := b.Min.X; y
<
b.Max.X; x++ {
doStuffWith(m.At(x, y))
}
}
...
...
doc/articles/json_rpc_tale_of_interfaces.html
View file @
edc7b473
...
...
@@ -57,7 +57,7 @@ original functionality. From there it is simple to build a
After some similar changes to the client side, this was the full extent of the
work we needed to do on the RPC package. This whole exercise took about 20
minutes! After tidying up and testing the new code, the
<a
href=
"http://code.google.com/p/go/source/diff?spec=svn9daf796ebf1cae97b2fcf760a4ab682f1f063f29&
r=9daf796ebf1cae97b2fcf760a4ab682f1f063f29&format=side&
path=/src/pkg/rpc/server.go"
>
final changeset
</a>
<a
href=
"http://code.google.com/p/go/source/diff?spec=svn9daf796ebf1cae97b2fcf760a4ab682f1f063f29&
amp;r=9daf796ebf1cae97b2fcf760a4ab682f1f063f29&format=side&
path=/src/pkg/rpc/server.go"
>
final changeset
</a>
was submitted.
</p>
...
...
doc/code.html
View file @
edc7b473
...
...
@@ -182,7 +182,7 @@ func Sqrt(x float64) float64 {
// This is a terrible implementation.
// Real code should import "math" and use math.Sqrt.
z := 0.0
for i := 0; i
<
1000
;
i
++
{
for i := 0; i
<
1000; i++ {
z -= (z*z - x) / (2 * x)
}
return z
...
...
doc/install.html
View file @
edc7b473
...
...
@@ -41,7 +41,7 @@ proceeding. If your OS or architecture is not on the list, it's possible that
</tr>
<tr><td
colspan=
"3"
><hr></td></tr>
<tr><td>
FreeBSD 7 or later
</td>
<td>
amd64, 386
</td>
<td>
Debian GNU/kFreeBSD not supported
</td></tr>
<tr><td>
Linux 2.6.23 or later with glibc
</td>
<td>
amd64, 386, arm
</td>
<td>
CentOS/RHEL 5.x not supported; no binary distribution for ARM yet
</tr>
<tr><td>
Linux 2.6.23 or later with glibc
</td>
<td>
amd64, 386, arm
</td>
<td>
CentOS/RHEL 5.x not supported; no binary distribution for ARM yet
</t
d></t
r>
<tr><td>
Mac OS X 10.6/10.7
</td>
<td>
amd64, 386
</td>
<td>
use the gcc
<sup>
†
</sup>
that comes with Xcode
</td></tr>
<tr><td>
Windows 2000 or later
</td>
<td>
amd64, 386
</td>
<td>
use mingw gcc
<sup>
†
</sup>
; cygwin or msys is not needed
</td></tr>
</table>
...
...
@@ -155,7 +155,7 @@ a zip archive that requires you to set some environment variables and an
experimental MSI installer that configures your installation automatically.
</p>
<h4
id=
"windows_zip"
>
Zip archive
</h
3
>
<h4
id=
"windows_zip"
>
Zip archive
</h
4
>
<p>
Extract the
<a
href=
"http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DArchive"
>
zip file
</a>
...
...
@@ -171,7 +171,7 @@ the <code>GOROOT</code> environment variable to your chosen path.
Add the
<code>
bin
</code>
subdirectory of your Go root (for example,
<code>
c:\Go\bin
</code>
) to to your
<code>
PATH
</code>
environment variable.
</p>
<h4
id=
"windows_msi"
>
MSI installer (experimental)
</h
3
>
<h4
id=
"windows_msi"
>
MSI installer (experimental)
</h
4
>
<p>
Open the
<a
href=
"http://code.google.com/p/go/downloads/list?q=OpSys-Windows+Type%3DInstaller"
>
MSI file
</a>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment