下面是一些示例代碼:func main() { os.MkdirAll(outDir + id, 0755) os.Create(outDir + id + "/txt") os.OpenFile(outDir + id + "/" + ".tmp", os.OWRONLY|os_APPEND) os.Stat(outDir + id + "/.tmp")}以下是使用任一格式化或go fmt按下Go Playground后的輸出:Formatfunc main() { os.MkdirAll(outDir+id, 0755) os.Create(outDir + id + "/txt") os.OpenFile(outDir+id+"/"+".tmp", os.OWRONLY|os_APPEND) os.Stat(outDir + id + "/.tmp")}和 中的空格在os.MkdirAll()和中未觸及時(shí)os.OpenFile()被刪除。我希望格式是相同的。os.Create()os.Stat()為什么會(huì)這樣?
- 1 回答
- 0 關(guān)注
- 197 瀏覽
添加回答
舉報(bào)
0/150
提交
取消