Update main.go
This commit is contained in:
parent
f59fd170d1
commit
7a13588a2a
|
|
@ -45,7 +45,7 @@ func main() {
|
|||
err = os.MkdirAll(filepath.Join(directory, "new_folder"), 0755)
|
||||
CheckIfError(err)
|
||||
|
||||
// 创建文件
|
||||
// 创建文件,由于git不允许创建空的文件夹,这里创建.keep文件来保证文件夹正常创建
|
||||
filePath := filepath.Join(directory, "new_folder", ".keep")
|
||||
err = os.WriteFile(filePath, []byte(""), 0644)
|
||||
CheckIfError(err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue