Mage v1.11.0 supports taking positional arguments for targets that have 
arguments of type int, bool, string, or time.Duration. For example, if your 
magefile contains this target:
func Build(what string) { 
    fmt.Printf("building the %s...\n", what) 
} 

you can run it by running
$ mage build server 
building the server... 

You can also use functions that have those same types of arguments as 
dependencies by using the mg.F function:
func Deploy(what string) { 
     mg.Deps(mg.F(Build, what)) 
     fmt.Printf("deploying the %s...\n") 
} 

$ mage deploy server 
building the server... 
deploying the server... 

https://github.com/magefile/mage/releases/tag/v1.11.0

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2708e67d-0292-4981-823c-89b663ccca22n%40googlegroups.com.

Reply via email to