You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normalized heading levels, updated titles, fixed a few link syntax problems.
We might delete some of these as outdated at some point.
For golang/go#61940.
Copy file name to clipboardexpand all lines: AssemblyPolicy.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
---
2
+
title: AssemblyPolicy
3
+
---
4
+
1
5
This document describes when and how to add assembly code to the Go cryptography packages.
2
6
3
7
In general, the rules are:
@@ -12,4 +16,4 @@ In general, the rules are:
12
16
* The code must be tested in our CI. This means there need to be builders that support the instructions, and if there are multiple (or fallback) paths they must be tested separately. (Tip: use `GODEBUG=cpu.X=off` to disable detection of CPU features.)
13
17
* Document in the Go code why the implementation requires assembly (specific performance benefit, access to instructions, etc), so we can reevaluate as the compiler improves.
14
18
15
-
Not all assembly currently in the standard library adheres to this policy. Changes to existing assembly will be discouraged until that implementation is updated to be compliant. New assembly must be compliant.
19
+
Not all assembly currently in the standard library adheres to this policy. Changes to existing assembly will be discouraged until that implementation is updated to be compliant. New assembly must be compliant.
Copy file name to clipboardexpand all lines: Benchmarks.md
+5
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
---
2
+
title: Benchmarks
3
+
---
4
+
1
5
These are benchmarks collected from the community used to measure the effects of changes to the Go core (compiler, runtime, garbage collector, and libraries). They should have the following properties:
2
6
3
7
- they matter; someone cares, perhaps in a dollars-and-cents way, that they run well
@@ -65,3 +69,4 @@ A few have been proposed but have so far failed to make the cut (for fetch, buil
Copy file name to clipboardexpand all lines: BoundingResourceUse.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
---
2
+
title: Bounding resource use
3
+
---
4
+
1
5
To bound a program's use of a limited resource - like memory - have goroutines synchronize their use of that resource using a buffered channel (i.e., use the channel as a semaphore):
2
6
3
7
```go
@@ -25,4 +29,5 @@ func handle(r *Request) {
25
29
26
30
## References
27
31
28
-
Effective Go's discussion of channels: https://go.dev/doc/effective_go#channels
32
+
Effective Go's discussion of channels: https://go.dev/doc/effective_go#channels
Copy file name to clipboardexpand all lines: CSSStyleGuide.md
+5-1
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,6 @@
1
-
# Go CSS Coding Guidelines
1
+
---
2
+
title: Go CSS Coding Guidelines
3
+
---
2
4
3
5
**Please [discuss changes](https://go.dev/issue/new?title=wiki%3A+CSSStyleGuide+change&body=&labels=Documentation) before editing this page**, even _minor_ ones. Many people have opinions and this is not the place for edit wars.
4
6
@@ -218,3 +220,5 @@ Add height and width attributes to images in the html markup to help minimize la
Copy file name to clipboardexpand all lines: ChromeOS.md
+12-6
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,8 @@
1
-
# Introduction
1
+
---
2
+
title: ChromeOS
3
+
---
4
+
5
+
## Introduction
2
6
3
7
You don't need to compile from source in Developer mode, you can just use the [Chromebrew](https://github.com/skycocker/chromebrew)-provided version.
4
8
@@ -7,7 +11,7 @@ If your Chromebook is relatively new, you can enable the Linux VM now built into
7
11
This tutorial will show you how to install, build, and run Go on Chrome OS.
8
12
Please note this has only been tested on a 64GB LTE Pixel, however it should work on other Chromebooks. Note that enabling developer mode reduces the security guarantees offered by Chrome OS.
9
13
10
-
# Install Go
14
+
##Install Go
11
15
First download the latest version of Go for Linux from the [Go Downloads page](https://go.dev/dl/).
12
16
After that, open a shell by hitting (CTRL+ALT+T) and typing in `shell` then hit enter. Then extract it using the following command (when replacing `< Go Linux package >` with the name of the file you downloaded):
13
17
@@ -17,18 +21,18 @@ sudo tar xpvf ~/Downloads/< Go Linux package > -C /usr/local
17
21
18
22
Go should now be installed you can test this by typing `/usr/local/go/bin/go`. If it installed correctly, you should see the Go help prompt. Go is now installed.
19
23
20
-
# Create a Workspace
24
+
##Create a Workspace
21
25
To keep this simple just create a folder called `/usr/local/go/work`. Also, create a folder called `src` inside `/usr/local/go/work/`.
Then running `git push fork` will update GitHub to perfectly mirror *everything* (all branches, all tags, etc.). This is handy, but take care when using this on multiple clients. You are bypassing the usual git safeguards, so it is easy to overwrite (and thus lose) work pushed by a different client.
58
+
Then running `git push fork` will update GitHub to perfectly mirror *everything* (all branches, all tags, etc.). This is handy, but take care when using this on multiple clients. You are bypassing the usual git safeguards, so it is easy to overwrite (and thus lose) work pushed by a different client.
Copy file name to clipboardexpand all lines: CodeReviewComments.md
+8-4
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# Go Code Review Comments
1
+
---
2
+
title: Go Code Review Comments
3
+
---
2
4
3
5
This page collects common comments made during reviews of Go code, so
4
6
that a single detailed explanation can be referred to by shorthands.
5
7
This is a laundry list of common style issues, not a comprehensive style guide.
6
8
7
9
You can view this as a supplement to [Effective Go](https://go.dev/doc/effective_go).
8
10
9
-
Additional comments related to testing can be found at [Go Test Comments](https://github.com/golang/go/wiki/TestComments)
11
+
Additional comments related to testing can be found at [Go Test Comments](/wiki/TestComments)
10
12
11
13
Google has published a longer [Go Style Guide](https://google.github.io/styleguide/go/decisions).
12
14
@@ -425,7 +427,7 @@ boundaries are, not to start counting lines.
425
427
426
428
See https://go.dev/doc/effective_go#mixed-caps. This applies even when it breaks conventions in other languages. For example an unexported constant is `maxLength` not `MaxLength` or `MAX_LENGTH`.
427
429
428
-
Also see [Initialisms](https://github.com/golang/go/wiki/CodeReviewComments#initialisms).
430
+
Also see [Initialisms](/wiki/CodeReviewComments#initialisms).
429
431
430
432
## Named Result Parameters
431
433
@@ -597,7 +599,7 @@ if got != tt.want {
597
599
598
600
Note that the order here is actual != expected, and the message uses that order too. Some test frameworks encourage writing these backwards: 0 != x, "expected 0, got x", and so on. Go does not.
599
601
600
-
If that seems like a lot of typing, you may want to write a [[table-driven test|TableDrivenTests]].
602
+
If that seems like a lot of typing, you may want to write a [table-driven test](TableDrivenTests).
601
603
602
604
Another common technique to disambiguate failing tests when using a test helper with different input is to wrap each caller with a different TestFoo function, so the test fails with that name:
603
605
@@ -615,3 +617,5 @@ Variable names in Go should be short rather than long. This is especially true
615
617
The basic rule: the further from its declaration that a name is used, the more descriptive the name must be. For a method receiver, one or two letters is sufficient. Common variables such as loop indices and readers can be a single letter (`i`, `r`). More unusual things and global variables need more descriptive names.
616
618
617
619
See also the longer discussion in [the Google Go Style Guide](https://google.github.io/styleguide/go/decisions#variable-names).
0 commit comments