Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for DefaultConds (1.12 sec)

  1. src/cmd/go/internal/script/scripttest/scripttest.go

    func DefaultCmds() map[string]script.Cmd {
    	cmds := script.DefaultCmds()
    	cmds["skip"] = Skip()
    	return cmds
    }
    
    // DefaultConds returns a set of broadly useful script conditions.
    //
    // This set includes all of the conditions in script.DefaultConds,
    // as well as:
    //
    //   - Conditions of the form "exec:foo" are active when the executable "foo" is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 11 20:12:18 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  2. src/cmd/go/internal/script/conds.go

    package script
    
    import (
    	"cmd/go/internal/imports"
    	"fmt"
    	"os"
    	"runtime"
    	"sync"
    )
    
    // DefaultConds returns a set of broadly useful script conditions.
    //
    // Run the 'help' command within a script engine to view a list of the available
    // conditions.
    func DefaultConds() map[string]Cond {
    	conds := make(map[string]Cond)
    
    	conds["GOOS"] = PrefixCondition(
    		"runtime.GOOS == <suffix>",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 5K bytes
    - Viewed (0)
  3. src/cmd/go/scriptconds_test.go

    	"internal/platform"
    	"internal/testenv"
    	"os"
    	"os/exec"
    	"path/filepath"
    	"runtime"
    	"runtime/debug"
    	"strings"
    	"sync"
    )
    
    func scriptConditions() map[string]script.Cond {
    	conds := scripttest.DefaultConds()
    
    	add := func(name string, cond script.Cond) {
    		if _, ok := conds[name]; ok {
    			panic(fmt.Sprintf("condition %q is already registered", name))
    		}
    		conds[name] = cond
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 22:16:54 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  4. src/cmd/go/internal/vcweb/script.go

    )
    
    // newScriptEngine returns a script engine augmented with commands for
    // reproducing version-control repositories by replaying commits.
    func newScriptEngine() *script.Engine {
    	conds := script.DefaultConds()
    
    	interrupt := func(cmd *exec.Cmd) error { return cmd.Process.Signal(os.Interrupt) }
    	gracePeriod := 30 * time.Second // arbitrary
    
    	cmds := script.DefaultCmds()
    	cmds["at"] = scriptAt()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 08 19:37:03 UTC 2022
    - 9K bytes
    - Viewed (0)
  5. src/cmd/go/internal/script/engine.go

    	Quiet bool
    }
    
    // NewEngine returns an Engine configured with a basic set of commands and conditions.
    func NewEngine() *Engine {
    	return &Engine{
    		Cmds:  DefaultCmds(),
    		Conds: DefaultConds(),
    	}
    }
    
    // A Cmd is a command that is available to a script.
    type Cmd interface {
    	// Run begins running the command.
    	//
    	// If the command produces output or can be run in the background, run returns
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 27 01:16:19 UTC 2023
    - 22.2K bytes
    - Viewed (0)
Back to top