github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/agent/tools/export_test.go (about) 1 package tools 2 3 import ( 4 "os" 5 "runtime" 6 ) 7 8 func getDirPerm() os.FileMode { 9 // File permissions on windows yield diferent results then on Linux 10 // For example an os.FileMode of 0100 on a directory on Windows, 11 // will yield -r-xr-xr-x. os.FileMode of 0755 will yield -rwxrwxrwx 12 if runtime.GOOS == "windows" { 13 return os.FileMode(0777) 14 } 15 return os.FileMode(dirPerm) 16 } 17 18 var ( 19 DirPerm = getDirPerm() 20 ) 21 22 const ( 23 ToolsFile = toolsFile 24 GUIArchiveFile = guiArchiveFile 25 )