Skip to content

update home page with a better example #293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions site/content/index.md
Original file line number Diff line number Diff line change
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