hello world
This commit is contained in:
parent
78b7b565fd
commit
f54cd08d40
@ -1,11 +1,11 @@
|
|||||||
// ## Hello World
|
// ## Hello World
|
||||||
|
|
||||||
// Here's an example Go program.
|
// Our first program prints the classic "Hello world"`
|
||||||
|
// message.
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// It prints `Hello world`.
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("Hello world")
|
fmt.Println("Hello world")
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,8 @@
|
|||||||
$ go run hello-world.go
|
$ go run hello-world.go
|
||||||
Hello world
|
Hello world
|
||||||
|
|
||||||
# The `go run example.go` approach is a great way to
|
# Sometimes we'll want to build our programs into
|
||||||
# experiment with Go examples, and we'll use it heavily
|
# binaries. We can do this using `go build`.
|
||||||
# throughout this book.
|
|
||||||
|
|
||||||
# Sometimes we'll need to build our sample programs
|
|
||||||
# into stand-alone binaries. We can do this using
|
|
||||||
# `go build`, which will produce a binary based on the
|
|
||||||
# name of the given Go file.
|
|
||||||
$ go build hello-world.go
|
$ go build hello-world.go
|
||||||
$ ls
|
$ ls
|
||||||
hello-world hello-world.go
|
hello-world hello-world.go
|
||||||
|
@ -69,9 +69,9 @@ div.chapter {
|
|||||||
margin-bottom: 120px;
|
margin-bottom: 120px;
|
||||||
}
|
}
|
||||||
div#intro {
|
div#intro {
|
||||||
width: 400px;
|
width: 380px;
|
||||||
min-width: 400px;
|
min-width: 380px;
|
||||||
max-width: 400px;
|
max-width: 380px;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
@ -83,9 +83,9 @@ table td {
|
|||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
td.docs {
|
td.docs {
|
||||||
width: 400px;
|
width: 380px;
|
||||||
max-width: 400px;
|
max-width: 380px;
|
||||||
min-width: 400px;
|
min-width: 380px;
|
||||||
min-height: 5px;
|
min-height: 5px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@ -96,9 +96,9 @@ td.docs p {
|
|||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
td.code {
|
td.code {
|
||||||
width: 400px;
|
width: 410px;
|
||||||
max-width: 400px;
|
max-width: 410px;
|
||||||
min-width: 400px;
|
min-width: 410px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user