Skip to content

Commit 310e198

Browse files
authored
update home page with a better example (#293)
Also change the order of installation methods, recommending `go modules` instead of $GOPATH.
1 parent cb825cb commit 310e198

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

site/content/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ and Mage automatically uses them as Makefile-like runnable targets.
1313
Mage has no dependencies outside the Go standard library, and builds with Go 1.7
1414
and above (possibly even lower versions, but they're not regularly tested).
1515

16-
**Using GOPATH**
16+
**Using Go Modules (Recommended)**
1717

1818
```plain
19-
go get -u -d github.com/magefile/mage
20-
cd $GOPATH/src/github.com/magefile/mage
19+
git clone https://github.com/magefile/mage
20+
cd mage
2121
go run bootstrap.go
2222
```
2323

24-
**Using Go Modules**
24+
**Using GOPATH**
2525

2626
```plain
27-
git clone https://github.com/magefile/mage
28-
cd mage
27+
go get -u -d github.com/magefile/mage
28+
cd $GOPATH/src/github.com/magefile/mage
2929
go run bootstrap.go
3030
```
3131

@@ -53,9 +53,9 @@ import (
5353
"github.com/magefile/mage/sh"
5454
)
5555

56-
// Runs dep ensure and then installs the binary.
56+
// Runs go mod download and then installs the binary.
5757
func Build() error {
58-
if err := sh.Run("dep", "ensure"); err != nil {
58+
if err := sh.Run("go", "mod", "download"); err != nil {
5959
return err
6060
}
6161
return sh.Run("go", "install", "./...")

0 commit comments

Comments
 (0)