[Solved] Golang Error: The system cannot find the path specified. [mkdir C:/xx/yy/]:

The system cannot find the path specified

If you report an error when creating a directory, it is recommended that you check the following:

err := os.Mkdir(path, perm)

If you use the above method, you can only create a single level directory
if you want to create a directory such as XX/YY, XX/YY/ZZ,…
please enter the following method

err := os.MkdirAll(path, perm)

OK! Problem solved!


Read More: