Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 426 for flag (0.11 sec)

  1. src/cmd/go/internal/lockedfile/lockedfile_filelock.go

    )
    
    func openFile(name string, flag int, perm fs.FileMode) (*os.File, error) {
    	// On BSD systems, we could add the O_SHLOCK or O_EXLOCK flag to the OpenFile
    	// call instead of locking separately, but we have to support separate locking
    	// calls for Linux and Windows anyway, so it's simpler to use that approach
    	// consistently.
    
    	f, err := os.OpenFile(name, flag&^os.O_TRUNC, perm)
    	if err != nil {
    		return nil, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testplugin/testdata/issue25756/main.go

    // Run the game of life in C using Go for parallelization.
    
    package main
    
    import (
    	"flag"
    	"fmt"
    	"plugin"
    )
    
    const MAXDIM = 100
    
    var dim = flag.Int("dim", 16, "board dimensions")
    var gen = flag.Int("gen", 10, "generations")
    
    func main() {
    	flag.Parse()
    
    	var a [MAXDIM * MAXDIM]int32
    	for i := 2; i < *dim; i += 8 {
    		for j := 2; j < *dim-3; j += 8 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 928 bytes
    - Viewed (0)
  3. src/cmd/go/internal/fmtcmd/fmt.go

    	"cmd/go/internal/cfg"
    	"cmd/go/internal/load"
    	"cmd/go/internal/modload"
    	"cmd/internal/sys"
    )
    
    func init() {
    	base.AddBuildFlagsNX(&CmdFmt.Flag)
    	base.AddChdirFlag(&CmdFmt.Flag)
    	base.AddModFlag(&CmdFmt.Flag)
    	base.AddModCommonFlags(&CmdFmt.Flag)
    }
    
    var CmdFmt = &base.Command{
    	Run:       runFmt,
    	UsageLine: "go fmt [-n] [-x] [packages]",
    	Short:     "gofmt (reformat) package sources",
    	Long: `
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 3K bytes
    - Viewed (0)
  4. src/cmd/trace/main.go

    )
    
    func main() {
    	telemetry.Start()
    	flag.Usage = func() {
    		fmt.Fprint(os.Stderr, usageMessage)
    		os.Exit(2)
    	}
    	flag.Parse()
    	telemetry.Inc("trace/invocations")
    	telemetry.CountFlags("trace/flag:", *flag.CommandLine)
    
    	// Go 1.7 traces embed symbol info and does not require the binary.
    	// But we optionally accept binary as first arg for Go 1.5 traces.
    	switch flag.NArg() {
    	case 1:
    		traceFile = flag.Arg(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  5. src/cmd/go/chdir_test.go

    		if cmd.CustomFlags {
    			if !strings.Contains(string(script), "# "+name+"\n") {
    				t.Errorf("%s has custom flags, not tested in testdata/script/chdir.txt", name)
    			}
    			return
    		}
    		f := cmd.Flag.Lookup("C")
    		if f == nil {
    			t.Errorf("%s has no -C flag", name)
    		} else if f.Usage != "AddChdirFlag" {
    			t.Errorf("%s has -C flag but not from AddChdirFlag", name)
    		}
    	}
    	walk("go", base.Go)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 03 12:16:35 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/test_chatty_parallel_fail.txt

    import (
    	"testing"
    	"fmt"
    	"flag"
    )
    
    // This test ensures the order of CONT lines in parallel chatty tests.
    func TestChattyParallel(t *testing.T) {
    	t.Parallel()
    
    	// The number of concurrent tests running. This is closely tied to the
    	// -parallel test flag, so we grab it from the flag rather than setting it
    	// to some constant.
    	parallel := flag.Lookup("test.parallel").Value.(flag.Getter).Get().(int)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 19:50:36 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  7. src/cmd/relnote/relnote_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"flag"
    	"internal/testenv"
    	"io/fs"
    	"os"
    	"path/filepath"
    	"testing"
    
    	"golang.org/x/build/relnote"
    )
    
    var flagCheck = flag.Bool("check", false, "run API release note checks")
    
    // Check that each file in api/next has corresponding release note files in doc/next.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 16:31:53 UTC 2024
    - 1K bytes
    - Viewed (0)
  8. src/cmd/go/testdata/script/goflags.txt

    # bad flags are diagnosed
    env GOFLAGS=-typoflag
    ! go list runtime
    stderr 'unknown flag -typoflag'
    
    env GOFLAGS=-
    ! go list runtime
    stderr '^go: parsing \$GOFLAGS: non-flag "-"'
    
    env GOFLAGS=--
    ! go list runtime
    stderr '^go: parsing \$GOFLAGS: non-flag "--"'
    
    env GOFLAGS=---oops
    ! go list runtime
    stderr '^go: parsing \$GOFLAGS: non-flag "---oops"'
    
    env GOFLAGS=-=noname
    ! go list runtime
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 25 16:47:27 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  9. src/cmd/go/alldocs.go

    // The -fmt flag reformats the go.work file without making other changes.
    // This reformatting is also implied by any other modifications that use or
    // rewrite the go.mod file. The only time this flag is needed is if no other
    // flags are specified, as in 'go work edit -fmt'.
    //
    // The -godebug=key=value flag adds a godebug key=value line,
    // replacing any existing godebug lines with the given key.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 16:54:28 UTC 2024
    - 142.4K bytes
    - Viewed (0)
  10. src/cmd/go/internal/modfetch/codehost/shell.go

    import (
    	"archive/zip"
    	"bufio"
    	"bytes"
    	"flag"
    	"fmt"
    	"io"
    	"log"
    	"os"
    	"strings"
    	"time"
    
    	"cmd/go/internal/cfg"
    	"cmd/go/internal/modfetch/codehost"
    )
    
    func usage() {
    	fmt.Fprintf(os.Stderr, "usage: go run shell.go vcs remote\n")
    	os.Exit(2)
    }
    
    func main() {
    	cfg.GOMODCACHE = "/tmp/vcswork"
    	log.SetFlags(0)
    	log.SetPrefix("shell: ")
    	flag.Usage = usage
    	flag.Parse()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 2.8K bytes
    - Viewed (0)
Back to top