Skip to content

Commit 787a929

Browse files
committed
README.md: change the build instruction
After go1.16, `go get` runs in modules mode, and it's not the recommended way of installing binaries nor a way to fetch source code. Given that this example repo is designed for new go users who want to learn, it is better to guide users to clone the repo using the git command. Updated the instruction for appengine-hello since goapp is gone. I didn't test the appengine-hello instruction myself and not sure if it still runs. Change-Id: I74a829203def9b062bee75637c7d2c6cef448a2f Reviewed-on: https://go-review.googlesource.com/c/example/+/340113 Trust: Hyang-Ah Hana Kim <[email protected]> Run-TryBot: Hyang-Ah Hana Kim <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Rebecca Stambler <[email protected]>
1 parent 09c3a5e commit 787a929

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

README.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
# Go example projects
22

3-
43
[![Go Reference](https://pkg.go.dev/badge/golang.org/x/example.svg)](https://pkg.go.dev/golang.org/x/example)
54

65
This repository contains a collection of Go programs and libraries that
76
demonstrate the language, standard libraries, and tools.
87

9-
## [hello](hello/) and [stringutil](stringutil/)
8+
## Clone the project
109

11-
go get golang.org/x/example/hello
10+
```
11+
$ git clone https://go.googlesource.com/example
12+
$ cd example
13+
```
14+
https://go.googlesource.com/example is the canonical Git repository.
15+
It is mirrored at https://github.com/golang/example.
16+
## [hello](hello/) and [stringutil](stringutil/)
1217

18+
```
19+
$ cd hello
20+
$ go build
21+
```
1322
A trivial "Hello, world" program that uses a stringutil package.
1423

1524
Command [hello](hello/) covers:
@@ -26,8 +35,10 @@ Library [stringutil](stringutil/) covers:
2635

2736
## [outyet](outyet/)
2837

29-
go get golang.org/x/example/outyet
30-
38+
```
39+
$ cd outyet
40+
$ go build
41+
```
3142
A web server that answers the question: "Is Go 1.x out yet?"
3243

3344
Topics covered:
@@ -45,12 +56,10 @@ Topics covered:
4556

4657
## [appengine-hello](appengine-hello/)
4758

48-
goapp get golang.org/x/example/appengine-hello
49-
5059
A trivial "Hello, world" App Engine application intended to be used as the
51-
starting point for your own code.
52-
53-
_Note_: The `goapp` tool is part of the [Google App Engine SDK for Go](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go).
60+
starting point for your own code. Please see
61+
[Google App Engine SDK for Go](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go)
62+
and [Quickstart for Go in the App Engine Standard Environment](https://cloud.google.com/appengine/docs/standard/go/quickstart).
5463

5564
## [gotypes](gotypes/)
5665

0 commit comments

Comments
 (0)