github.com/hernad/nomad@v1.6.112/helper/pluginutils/loader/filter_unix.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 "os"
    10  
    11  // executable Checks to see if the file is executable by anyone.
    12  func executable(path string, f os.FileInfo) bool {
    13  	return f.Mode().Perm()&0111 != 0
    14  }