From abdc8f0e80195c777520d464a1f9c027a4cf9d79 Mon Sep 17 00:00:00 2001 From: Cameron Balahan Date: Mon, 31 Jul 2023 14:48:34 -0400 Subject: [PATCH] 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 Run-TryBot: Russ Cox Reviewed-by: Russ Cox TryBot-Result: Gopher Robot --- _content/blog/gonew.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_content/blog/gonew.md b/_content/blog/gonew.md index 84caf33d..c5732d1e 100644 --- a/_content/blog/gonew.md +++ b/_content/blog/gonew.md @@ -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): +``` $ go install golang.org/x/tools/cmd/gonew@latest +``` To copy an existing template, run `gonew` in your new project’s parent directory with two arguments: first, the path to the template you wish to copy, and second, the module name of the project you are creating. For example: +``` $ gonew golang.org/x/example/helloserver example.com/myserver $ cd ./myserver +``` And then you can read and edit the files in `./myserver` to customize.