improve command gen service for cli

This commit is contained in:
John Guo
2022-04-29 11:08:16 +08:00
parent 0cf28c0f07
commit 7fcf7d31a0

View File

@ -41,5 +41,8 @@ func GoImports(path string) {
// IsFileDoNotEdit checks and returns whether file contains `do not edit` key.
func IsFileDoNotEdit(filePath string) bool {
if !gfile.Exists(filePath) {
return true
}
return gstr.Contains(gfile.GetContents(filePath), consts.DoNotEditKey)
}