defer f.Close()
f.Write([]byte(str))
} else {
- return fmt.Errorf("sync file exists, delete the file frst")
+ return fmt.Errorf("sync file exists, delete the file first")
}
return nil
}
func ActionResultWithStdout(s string) ActionResultOptionFn {
return func(res *ActionResult) {
- res.ErrOutput = s
+ res.StdOutput = s
}
}