标签:variable mod https href build efault class amp 资料
Mage 是基于golang 开发的,类似make/rake 的工具,我们可以使用golang 代码编写类似make 的功能 
以下是一个简单的使用
go get -u -d github.com/magefile/mage
go mod init github.com/rongfengliang/build-make
main.go
//+build mage
?
package main
?
import (
    "fmt"
?
    "github.com/magefile/mage/sh"
)
?
// echo && ls
func Build() {
    if err := sh.Run("ls", "-sialh", "."); err != nil {
        fmt.Println("some wrong")
    }
?
    sh.RunV("echo", "$PWD")
}
类似的工具还是很多的,比如go-task,just,tusk
https://github.com/magefile/mage 
https://github.com/casey/just 
https://github.com/rliebz/tusk 
https://github.com/go-task/task
Mage 类似make&&rake 基于golang 的build 工具
标签:variable mod https href build efault class amp 资料
原文地址:https://www.cnblogs.com/rongfengliang/p/13245742.html