path string hides the imported path . What you can do is set the imported package alias, for example. pathpkg by changing the line "path" in import to pathpkg "path" , so the beginning of your code will look like this
package main import ( pathpkg "path" "os" )
Of course you should change the DoIt code to:
pathpkg.Join(os.TempDir(), path)
macbirdie
source share