github.com/iqoqo/nomad@v0.11.3-0.20200911112621-d7021c74d101/helper/pluginutils/loader/filter_windows.go (about)

     1  // +build windows
     2  
     3  package loader
     4  
     5  import (
     6  	"os"
     7  	"path/filepath"
     8  )
     9  
    10  // On windows, an executable can be any file with any extension. To avoid
    11  // introspecting the file, here we skip executability checks on windows systems
    12  // and simply check for the convention of an `.exe` extension.
    13  func executable(path string, s os.FileInfo) bool {
    14  	return filepath.Ext(path) == ".exe"
    15  }