fix spelling (#551)

This commit is contained in:
anqiansong
2021-03-08 18:23:12 +08:00
committed by GitHub
parent 7ad86a52f3
commit 60c7edf8f8
13 changed files with 27 additions and 27 deletions

View File

@@ -27,7 +27,7 @@ func CreateIfNotExist(file string) (*os.File, error) {
return os.Create(file)
}
// RemoveIfExist deletes the specficed file if it is exists
// RemoveIfExist deletes the specified file if it is exists
func RemoveIfExist(filename string) error {
if !FileExists(filename) {
return nil
@@ -36,7 +36,7 @@ func RemoveIfExist(filename string) error {
return os.Remove(filename)
}
// RemoveOrQuit deletes the specficed file if read a permit command from stdin
// RemoveOrQuit deletes the specified file if read a permit command from stdin
func RemoveOrQuit(filename string) error {
if !FileExists(filename) {
return nil
@@ -49,7 +49,7 @@ func RemoveOrQuit(filename string) error {
return os.Remove(filename)
}
// FileExists returns true if the specficed file is exists
// FileExists returns true if the specified file is exists
func FileExists(file string) bool {
_, err := os.Stat(file)
return err == nil