1
0
mirror of https://github.com/magefile/mage.git synced 2026-10-24 06:19:18 +03:00
Files
mage/parse/testdata/command.go
Nate Finch be7943de50 Support multiple targets (#65)
* support multiple targets

* fix #66

* isolated list test

* add clean target to mage's magefile
2017-10-18 10:40:37 -04:00

34 lines
499 B
Go

// +build mage
package main
import (
"context"
"fmt"
"github.com/magefile/mage/mg"
)
// This should work as a default - even if it's in a different file
var Default = ReturnsNilError
// this should not be a target because it returns a string
func ReturnsString() string {
fmt.Println("more stuff")
return ""
}
func ReturnsVoid() {
mg.Deps(f)
}
func f() {}
func TakesContextReturnsVoid(ctx context.Context) {
}
func TakesContextReturnsError(ctx context.Context) error {
return nil
}