Skip to content

Commit

Permalink
update home page with a better example (#293)
Browse files Browse the repository at this point in the history
Also change the order of installation methods, recommending `go modules` instead of $GOPATH.
  • Loading branch information
guumaster committed Apr 16, 2020
1 parent cb825cb commit 310e198
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions site/content/index.md
Expand Up @@ -13,19 +13,19 @@ and Mage automatically uses them as Makefile-like runnable targets.
Mage has no dependencies outside the Go standard library, and builds with Go 1.7
and above (possibly even lower versions, but they're not regularly tested).

**Using GOPATH**
**Using Go Modules (Recommended)**

```plain
go get -u -d github.com/magefile/mage
cd $GOPATH/src/github.com/magefile/mage
git clone https://github.com/magefile/mage
cd mage
go run bootstrap.go
```

**Using Go Modules**
**Using GOPATH**

```plain
git clone https://github.com/magefile/mage
cd mage
go get -u -d github.com/magefile/mage
cd $GOPATH/src/github.com/magefile/mage
go run bootstrap.go
```

Expand Down Expand Up @@ -53,9 +53,9 @@ import (
"github.com/magefile/mage/sh"
)

// Runs dep ensure and then installs the binary.
// Runs go mod download and then installs the binary.
func Build() error {
if err := sh.Run("dep", "ensure"); err != nil {
if err := sh.Run("go", "mod", "download"); err != nil {
return err
}
return sh.Run("go", "install", "./...")
Expand Down

0 comments on commit 310e198

Please sign in to comment.