Fixing an error in the way commands are displayed in the gonew blog post
Change-Id: Ic6893334e813a5e79c99a1561da977d9ae5e319c Reviewed-on: https://go-review.googlesource.com/c/website/+/514555 Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Родитель
edbee6f9dd
Коммит
abdc8f0e80
|
@ -32,15 +32,19 @@ and help us build a more useful tool for everyone.
|
||||||
|
|
||||||
Start by installing `gonew` using [`go install`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies):
|
Start by installing `gonew` using [`go install`](https://pkg.go.dev/cmd/go#hdr-Compile_and_install_packages_and_dependencies):
|
||||||
|
|
||||||
|
```
|
||||||
$ go install golang.org/x/tools/cmd/gonew@latest
|
$ go install golang.org/x/tools/cmd/gonew@latest
|
||||||
|
```
|
||||||
|
|
||||||
To copy an existing template, run `gonew` in your new project’s parent
|
To copy an existing template, run `gonew` in your new project’s parent
|
||||||
directory with two arguments:
|
directory with two arguments:
|
||||||
first, the path to the template you wish to copy,
|
first, the path to the template you wish to copy,
|
||||||
and second, the module name of the project you are creating. For example:
|
and second, the module name of the project you are creating. For example:
|
||||||
|
|
||||||
|
```
|
||||||
$ gonew golang.org/x/example/helloserver example.com/myserver
|
$ gonew golang.org/x/example/helloserver example.com/myserver
|
||||||
$ cd ./myserver
|
$ cd ./myserver
|
||||||
|
```
|
||||||
|
|
||||||
And then you can read and edit the files in `./myserver` to customize.
|
And then you can read and edit the files in `./myserver` to customize.
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче