-
-
Save Xe/9029aa078953b14e026c827765fdba1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mage/main.go b/mage/main.go | |
index ca6510b..7222e7a 100644 | |
--- a/mage/main.go | |
+++ b/mage/main.go | |
@@ -283,6 +283,16 @@ func GenerateMainfile(path string, info *parse.PkgInfo) error { | |
Default: info.DefaultName, | |
} | |
+ var myf []parse.Function | |
+ for _, f := range info.Funcs { | |
+ if syns := strings.Split(f.Synopsis, " "); f.Name == syns[0] { | |
+ f.Synopsis = strings.Join(syns[1:], " ") | |
+ } | |
+ | |
+ myf = append(myf, f) | |
+ } | |
+ | |
+ data.Funcs = myf | |
data.DefaultError = info.DefaultIsError | |
if err := output.Execute(f, data); err != nil { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment