Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for containsKey (0.49 sec)

  1. src/cmd/go/internal/work/shell.go

    		// A gccgo command line can contain -( and -).
    		// Make sure we quote them since they are special to the shell.
    		// The trimpath argument can also contain > (part of =>) and ;. Quote those too.
    		if s == "" || strings.ContainsAny(s, " ()>;") || len(q) > len(s)+2 {
    			buf.WriteString(q)
    		} else {
    			buf.WriteString(s)
    		}
    	}
    	return buf.String()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 14:34:32 UTC 2024
    - 19.8K bytes
    - Viewed (0)
  2. src/cmd/go/internal/work/buildid.go

    		}
    
    		fields, _ := quoted.Split(compiler)
    		if len(fields) == 0 {
    			return "", "", fmt.Errorf("%s: compilation command confusion %q", name, out)
    		}
    		exe = fields[0]
    		if !strings.ContainsAny(exe, `/\`) {
    			if lp, err := cfg.LookPath(exe); err == nil {
    				exe = lp
    			}
    		}
    		id, err = buildid.ReadFile(exe)
    		if err != nil {
    			return "", "", err
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:31:25 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  3. src/cmd/go/internal/workcmd/edit.go

    	}
    
    	modload.WriteWorkFile(gowork, workFile)
    }
    
    // flagEditworkGodebug implements the -godebug flag.
    func flagEditworkGodebug(arg string) {
    	key, value, ok := strings.Cut(arg, "=")
    	if !ok || strings.ContainsAny(arg, "\"`',") {
    		base.Fatalf("go: -godebug=%s: need key=value", arg)
    	}
    	workedits = append(workedits, func(f *modfile.WorkFile) {
    		if err := f.AddGodebug(key, value); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 13:52:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  4. src/cmd/doc/main.go

    	// case letter, it can only be a symbol in the current directory.
    	// Kills the problem caused by case-insensitive file systems
    	// matching an upper case name as a package name.
    	if !strings.ContainsAny(arg, `/\`) && token.IsExported(arg) {
    		pkg, err := build.ImportDir(".", build.ImportComment)
    		if err == nil {
    			return pkg, "", arg, false
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/init.go

    }
    
    func CheckGodebug(verb, k, v string) error {
    	if strings.ContainsAny(k, " \t") {
    		return fmt.Errorf("key contains space")
    	}
    	if strings.ContainsAny(v, " \t") {
    		return fmt.Errorf("value contains space")
    	}
    	if strings.ContainsAny(k, ",") {
    		return fmt.Errorf("key contains comma")
    	}
    	if strings.ContainsAny(v, ",") {
    		return fmt.Errorf("value contains comma")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 18:36:30 UTC 2024
    - 69.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modfetch/codehost/vcs.go

    			return []string{"fossil", "cat", "-R", ".fossil", "-r", rev, file}
    		},
    		readZip: func(rev, subdir, remote, target string) []string {
    			extra := []string{}
    			if subdir != "" && !strings.ContainsAny(subdir, "*?[],") {
    				extra = []string{"--include", subdir}
    			}
    			// Note that vcsRepo.ReadZip below rewrites this command
    			// to run in a different directory, to work around a fossil bug.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:50:24 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  7. src/cmd/go/internal/envcmd/env.go

    	}
    
    	if !utf8.ValidString(val) {
    		return fmt.Errorf("invalid UTF-8 in %s=... value", key)
    	}
    	if strings.Contains(val, "\x00") {
    		return fmt.Errorf("invalid NUL in %s=... value", key)
    	}
    	if strings.ContainsAny(val, "\v\r\n") {
    		return fmt.Errorf("invalid newline in %s=... value", key)
    	}
    	return nil
    }
    
    func readEnvFileLines(mustExist bool) []string {
    	file, _, err := cfg.EnvFile()
    	if file == "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:51 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  8. src/bytes/bytes_test.go

    	{[]byte("aRegExp*"), ".(|)*+?^$[]", true},
    	{[]byte(dots + dots + dots), " ", false},
    }
    
    func TestContainsAny(t *testing.T) {
    	for _, ct := range ContainsAnyTests {
    		if ContainsAny(ct.b, ct.substr) != ct.expected {
    			t.Errorf("ContainsAny(%s, %s) = %v, want %v",
    				ct.b, ct.substr, !ct.expected, ct.expected)
    		}
    	}
    }
    
    var ContainsRuneTests = []struct {
    	b        []byte
    	r        rune
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/load/pkg.go

    			return
    		}
    	}
    	if name := pathpkg.Base(p.ImportPath); !SafeArg(name) {
    		setError(fmt.Errorf("invalid input directory name %q", name))
    		return
    	}
    	if strings.ContainsAny(p.Dir, "\r\n") {
    		setError(fmt.Errorf("invalid package directory %q", p.Dir))
    		return
    	}
    
    	// Build list of imported packages and full dependency list.
    	imports := make([]*Package, 0, len(p.Imports))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 28 17:00:51 UTC 2024
    - 120K bytes
    - Viewed (0)
  10. src/cmd/cover/cover.go

    			log.Fatalf("creating coverage meta-data builder: %v\n", err)
    		}
    		p = &Package{
    			mdb: mdb,
    		}
    	}
    	// TODO: process files in parallel here if it matters.
    	for k, name := range names {
    		if strings.ContainsAny(name, "\r\n") {
    			// annotateFile uses '//line' directives, which don't permit newlines.
    			log.Fatalf("cover: input path contains newline character: %q", name)
    		}
    
    		fd := os.Stdout
    		isStdout := true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top