github.com/hernad/nomad@v1.6.112/helper/pluginutils/loader/filter_windows.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 //go:build windows 5 // +build windows 6 7 package loader 8 9 import ( 10 "os" 11 "path/filepath" 12 ) 13 14 // On windows, an executable can be any file with any extension. To avoid 15 // introspecting the file, here we skip executability checks on windows systems 16 // and simply check for the convention of an `.exe` extension. 17 func executable(path string, s os.FileInfo) bool { 18 return filepath.Ext(path) == ".exe" 19 }