Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_content/doc/tutorial/getting-started.html: file formatting #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 32 additions & 40 deletions _content/doc/tutorial/getting-started.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,16 @@ <h2 id="code">Write some code</h2>
</p>

<pre>
cd
</pre
>
cd
</pre>

<p>
On Windows:
</p>

<pre>
cd %HOMEPATH%
</pre
>
cd %HOMEPATH%
</pre>
</li>

<li>
Expand Down Expand Up @@ -120,10 +118,9 @@ <h2 id="code">Write some code</h2>
</p>

<pre>
$ go mod init example/hello
go: creating new go.mod: module example/hello
</pre
>
$ go mod init example/hello
go: creating new go.mod: module example/hello
</pre>
</li>

<li>
Expand All @@ -134,15 +131,14 @@ <h2 id="code">Write some code</h2>
<p>Paste the following code into your hello.go file and save the file.</p>

<pre>
package main
package main

import "fmt"
import "fmt"

func main() {
fmt.Println("Hello, World!")
}
</pre
>
func main() {
fmt.Println("Hello, World!")
}
</pre>

<p>
This is your Go code. In this code, you:
Expand Down Expand Up @@ -173,10 +169,9 @@ <h2 id="code">Write some code</h2>
<p>Run your code to see the greeting.</p>

<pre>
$ go run .
Hello, World!
</pre
>
$ go run .
Hello, World!
</pre>

<p>
The
Expand All @@ -188,9 +183,8 @@ <h2 id="code">Write some code</h2>
</p>

<pre>
$ go help
</pre
>
$ go help
</pre>
</li>
</ol>

Expand Down Expand Up @@ -248,16 +242,16 @@ <h2 id="call">Call code in an external package</h2>
</p>

<pre>
package main
package main

import "fmt"
import "fmt"

<ins>import "rsc.io/quote"</ins>
<ins>import "rsc.io/quote"</ins>

func main() {
<ins>fmt.Println(quote.Go())</ins>
}
</pre>
func main() {
<ins>fmt.Println(quote.Go())</ins>
}
</pre>
</li>

<li>
Expand All @@ -270,21 +264,19 @@ <h2 id="call">Call code in an external package</h2>
Modules Reference.
</p>
<pre>
$ go mod tidy
go: finding module for package rsc.io/quote
go: found rsc.io/quote in rsc.io/quote v1.5.2
</pre
>
$ go mod tidy
go: finding module for package rsc.io/quote
go: found rsc.io/quote in rsc.io/quote v1.5.2
</pre>
</li>

<li>
Run your code to see the message generated by the function you're calling.

<pre>
$ go run .
Don't communicate by sharing memory, share memory by communicating.
</pre
>
$ go run .
Don't communicate by sharing memory, share memory by communicating.
</pre>

<p>
Notice that your code calls the <code>Go</code> function, printing a
Expand Down