A golang tool to automate the creation of Must funcs
Given this snippet,
package person
func DoGood(name str) error {
return errors.New("bad")
}
running this command
muster -func=DoGood
in the same directory will create the file dogood_must.go, in package person, containing a definition of
func MustDoGood(name string)
That method will panic if the result of DoGood is not nil.
Add this snipet in a file to use with go generate
//go:generate muster -func=DoGood