Skip to content

Commit

Permalink
README.md: change the build instruction
Browse files Browse the repository at this point in the history
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 <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
  • Loading branch information
HadesHappy committed Aug 11, 2021
1 parent 2b7946d commit f325e80
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Go example projects


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

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

## [hello](hello/) and [stringutil](stringutil/)
## Clone the project

go get golang.org/x/example/hello
```
$ git clone https://go.googlesource.com/example
$ cd example
```
https://go.googlesource.com/example is the canonical Git repository.
It is mirrored at https://github.com/golang/example.
## [hello](hello/) and [stringutil](stringutil/)

```
$ cd hello
$ go build
```
A trivial "Hello, world" program that uses a stringutil package.

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

## [outyet](outyet/)

go get golang.org/x/example/outyet

```
$ cd outyet
$ go build
```
A web server that answers the question: "Is Go 1.x out yet?"

Topics covered:
Expand All @@ -45,12 +56,10 @@ Topics covered:

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

goapp get golang.org/x/example/appengine-hello

A trivial "Hello, world" App Engine application intended to be used as the
starting point for your own code.

_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).
starting point for your own code. Please see
[Google App Engine SDK for Go](https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Go)
and [Quickstart for Go in the App Engine Standard Environment](https://cloud.google.com/appengine/docs/standard/go/quickstart).

## [gotypes](gotypes/)

Expand Down

0 comments on commit f325e80

Please sign in to comment.