From 6a48a5a31a32d549b221242fe25ad58d8413c400 Mon Sep 17 00:00:00 2001 From: endorama <526307+endorama@users.noreply.github.com> Date: Sun, 5 Dec 2021 22:41:27 +0100 Subject: [PATCH] go-install: add page (#7111) --- pages/common/go-install.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/common/go-install.md diff --git a/pages/common/go-install.md b/pages/common/go-install.md new file mode 100644 index 000000000..981a1f410 --- /dev/null +++ b/pages/common/go-install.md @@ -0,0 +1,20 @@ +# go install + +> Compile and install packages named by the import paths. +> More information: . + +- Compile and install the current package: + +`go install` + +- Compile and install a specific local package: + +`go install {{path/to/package}}` + +- Install the latest version of a program, ignoring `go.mod` in the current directory: + +`go install {{golang.org/x/tools/gopls}}@{{latest}}` + +- Install a program at the version selected by `go.mod` in the current directory: + +`go install {{golang.org/x/tools/gopls}}`