Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 93 for lockPath (0.29 sec)

  1. src/os/exec/example_test.go

    package exec_test
    
    import (
    	"context"
    	"encoding/json"
    	"fmt"
    	"io"
    	"log"
    	"os"
    	"os/exec"
    	"strings"
    	"time"
    )
    
    func ExampleLookPath() {
    	path, err := exec.LookPath("fortune")
    	if err != nil {
    		log.Fatal("installing fortune is in your future")
    	}
    	fmt.Printf("fortune is available at %s\n", path)
    }
    
    func ExampleCommand() {
    	cmd := exec.Command("tr", "a-z", "A-Z")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:18:48 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  2. src/internal/goroot/gc.go

    // init finds the gccgo search directories. If this fails it leaves dirs == nil.
    func (gd *gccgoDirs) init() {
    	gccgo := os.Getenv("GCCGO")
    	if gccgo == "" {
    		gccgo = "gccgo"
    	}
    	bin, err := exec.LookPath(gccgo)
    	if err != nil {
    		return
    	}
    
    	allDirs, err := exec.Command(bin, "-print-search-dirs").Output()
    	if err != nil {
    		return
    	}
    	versionB, err := exec.Command(bin, "-dumpversion").Output()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 18:16:28 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. src/path/filepath/path_windows.go

    	if strings.HasPrefix(p, prefix) {
    		return true
    	}
    	return strings.HasPrefix(strings.ToLower(p), strings.ToLower(prefix))
    }
    
    func splitList(path string) []string {
    	// The same implementation is used in LookPath in os/exec;
    	// consider changing os/exec when changing this.
    
    	if path == "" {
    		return []string{}
    	}
    
    	// Split path, respecting but preserving quotes.
    	list := []string{}
    	start := 0
    	quo := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 23:07:50 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. pkg/credentialprovider/plugin/plugin.go

    	registerMetrics()
    
    	for _, provider := range credentialProviderConfig.Providers {
    		// Considering Windows binary with suffix ".exe", LookPath() helps to find the correct path.
    		// LookPath() also calls os.Stat().
    		pluginBin, err := exec.LookPath(filepath.Join(pluginBinDir, provider.Name))
    		if err != nil {
    			if errors.Is(err, os.ErrNotExist) || errors.Is(err, exec.ErrNotFound) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 05 05:07:28 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  5. src/os/exec/exec.go

    // That is, if you run [LookPath]("go"), it will not successfully return
    // ./go on Unix nor .\go.exe on Windows, no matter how the path is configured.
    // Instead, if the usual path algorithms would result in that answer,
    // these functions return an error err satisfying [errors.Is](err, [ErrDot]).
    //
    // For example, consider these two program snippets:
    //
    //	path, err := exec.LookPath("prog")
    //	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:53 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  6. src/cmd/go/internal/vcweb/hg.go

    	"sync"
    	"time"
    )
    
    type hgHandler struct {
    	once      sync.Once
    	hgPath    string
    	hgPathErr error
    }
    
    func (h *hgHandler) Available() bool {
    	h.once.Do(func() {
    		h.hgPath, h.hgPathErr = exec.LookPath("hg")
    	})
    	return h.hgPathErr == nil
    }
    
    func (h *hgHandler) Handler(dir string, env []string, logger *log.Logger) (http.Handler, error) {
    	if !h.Available() {
    		return nil, ServerNotInstalledError{name: "hg"}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 02:52:19 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/vcweb/svn.go

    	listenErr error
    	conns     map[net.Conn]struct{}
    	closing   bool
    	done      chan struct{}
    }
    
    func (h *svnHandler) Available() bool {
    	h.pathOnce.Do(func() {
    		h.svnservePath, h.svnserveErr = exec.LookPath("svnserve")
    	})
    	return h.svnserveErr == nil
    }
    
    // Handler returns an http.Handler that checks for the "vcwebsvn" query
    // parameter and then serves the 'svn://' URL for the repository at the
    // requested path.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 13:44:48 UTC 2022
    - 5K bytes
    - Viewed (0)
  8. pkg/proxy/conntrack/conntrack.go

    	}
    	return parameters
    }
    
    // exec executes the conntrack tool using the given parameters
    func (ct *execCT) exec(parameters ...string) error {
    	conntrackPath, err := ct.execer.LookPath("conntrack")
    	if err != nil {
    		return fmt.Errorf("error looking for path of conntrack: %v", err)
    	}
    	klog.V(4).InfoS("Clearing conntrack entries", "parameters", parameters)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 18:09:05 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. src/cmd/link/dwarf_test.go

    				exe = filepath.Join(tmpDir, "go.o")
    			}
    
    			darwinSymbolTestIsTooFlaky := true // Turn this off, it is too flaky -- See #32218
    			if runtime.GOOS == "darwin" && !darwinSymbolTestIsTooFlaky {
    				if _, err = exec.LookPath("symbols"); err == nil {
    					// Ensure Apple's tooling can parse our object for symbols.
    					out, err = testenv.Command(t, "symbols", exe).CombinedOutput()
    					if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 03 17:05:14 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  10. src/internal/testenv/exec.go

    // If not, MustHaveExecPath calls t.Skip with an explanation.
    func MustHaveExecPath(t testing.TB, path string) {
    	MustHaveExec(t)
    
    	err, found := execPaths.Load(path)
    	if !found {
    		_, err = exec.LookPath(path)
    		err, _ = execPaths.LoadOrStore(path, err)
    	}
    	if err != nil {
    		t.Skipf("skipping test: %s: %s", path, err)
    	}
    }
    
    // CleanCmdEnv will fill cmd.Env with the environment, excluding certain
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 27 17:53:23 UTC 2023
    - 7.5K bytes
    - Viewed (0)
Back to top