{"id":1471,"date":"2020-02-23T17:30:37","date_gmt":"2020-02-23T17:30:37","guid":{"rendered":"https:\/\/golangbyexamples.com\/?p=1471"},"modified":"2020-02-23T17:30:49","modified_gmt":"2020-02-23T17:30:49","slug":"delete-folder-go","status":"publish","type":"post","link":"https:\/\/golangbyexamples.com\/delete-folder-go\/","title":{"rendered":"Delete\/Remove a folder in Go (Golang)"},"content":{"rendered":"\n
os.Remove()<\/strong> function can be used to delete a folder in Golang. Below is the signature of this function<\/p>\n\n\n\n Code:<\/strong><\/p>\n\n\n\n Output:<\/strong><\/p>\n\n\n\n os.Remove() function can be used to delete a folder in Golang. Below is the signature of this function Code: Output:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[206],"class_list":["post-1471","post","type-post","status-publish","format-standard","hentry","category-tech","tag-remove"],"yoast_head":"\nfunc Remove(name string) error<\/code><\/pre>\n\n\n\n
package main\n\nimport (\n \"log\"\n \"os\"\n)\n\nfunc main() {\n err := os.Remove(\"sample\")\n if err != nil {\n log.Fatal(err)\n }\n}<\/code><\/pre>\n\n\n\n
Deletes sample folder from the current working directory<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"