mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve command gen service for cli
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user