Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for gofmt (0.23 sec)

  1. src/cmd/gofmt/gofmt.go

    	// printerNormalizeNumbers means to canonicalize number literal prefixes
    	// and exponents while printing. See https://golang.org/doc/go1.13#gofmt.
    	//
    	// This value is defined in go/printer specifically for go/format and cmd/gofmt.
    	printerNormalizeNumbers = 1 << 30
    )
    
    // fdSem guards the number of concurrently-open file descriptors.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. src/cmd/cgo/godefs.go

    			if def := typedef[name]; def != nil {
    				id.Name = gofmt(def)
    			}
    		}
    	}
    
    	conf.Fprint(&buf, fset, f.AST)
    
    	return buf.String()
    }
    
    var gofmtBuf strings.Builder
    
    // gofmt returns the gofmt-formatted string for an AST node.
    func gofmt(n interface{}) string {
    	gofmtBuf.Reset()
    	err := printer.Fprint(&gofmtBuf, fset, n)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  3. src/cmd/fix/main.go

    	}
    	fmt.Fprintf(os.Stderr, "%s: fixed %s\n", filename, fixlog.String()[1:])
    
    	// Print AST.  We did that after each fix, so this appears
    	// redundant, but it is necessary to generate gofmt-compatible
    	// source code in a few cases. The official gofmt style is the
    	// output of the printer run on a standard AST generated by the parser,
    	// but the source we generated inside the loop above is the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. src/cmd/go/internal/work/buildid.go

    // binaries. For a binary, like cmd/gofmt, there are two steps: compile
    // cmd/gofmt/*.go into main.a, and then link main.a into the gofmt binary.
    // We do not install gofmt's main.a, only the gofmt binary. Being able to
    // decide that the gofmt binary is up-to-date means computing the action ID
    // for the final link of the gofmt binary and comparing it against the
    // already-installed gofmt binary. But computing the action ID for the link
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:31:25 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  5. src/syscall/rlimit.go

    // (limited by the size of fd_set).
    //
    // Go does not use select, so it should not be subject to these limits.
    // On some systems the limit is 256, which is very easy to run into,
    // even in simple programs like gofmt when they parallelize walking
    // a file tree.
    //
    // After a long discussion on go.dev/issue/46279, we decided the
    // best approach was for Go to raise the limit unconditionally for itself,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 20:13:57 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. src/go/printer/gobuild.go

    	p.output = append(p.output, block...)
    	p.output = append(p.output, after...)
    }
    
    // appendLines is like append(x, y...)
    // but it avoids creating doubled blank lines,
    // which would not be gofmt-standard output.
    // It assumes that only whole blocks of lines are being appended,
    // not line fragments.
    func appendLines(x, y []byte) []byte {
    	if len(y) > 0 && isNL(y[0]) && // y starts in blank line
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. src/cmd/distpack/pack.go

    			case "api", "dist", "distpack", "metadata":
    				return false
    			}
    		}
    		return true
    	})
    
    	// Add go and gofmt to bin, using cross-compiled binaries
    	// if this is a cross-compiled distribution.
    	binExes := []string{
    		"go",
    		"gofmt",
    	}
    	crossBin := "bin"
    	if goos != gohostos || goarch != gohostarch {
    		crossBin = "bin/" + goosUnderGoarch
    	}
    	for _, b := range binExes {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. cmd/kube-apiserver/app/options/options.go

    func (s *ServerRunOptions) Flags() (fss cliflag.NamedFlagSets) {
    	s.Options.AddFlags(&fss)
    	s.CloudProvider.AddFlags(fss.FlagSet("cloud provider"))
    
    	// Note: the weird ""+ in below lines seems to be the only way to get gofmt to
    	// arrange these text blocks sensibly. Grrr.
    	fs := fss.FlagSet("misc")
    
    	fs.BoolVar(&s.AllowPrivileged, "allow-privileged", s.AllowPrivileged,
    		"If true, allow privileged containers. [default=false]")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 12:19:56 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  9. hack/make-rules/verify.sh

    # These ideally run in less than 10s.
    QUICK_PATTERNS+=(
      "verify-api-groups.sh"
      "verify-boilerplate.sh"
      "verify-external-dependencies-version.sh"
      "verify-fieldname-docs.sh"
      "verify-gofmt.sh"
      "verify-imports.sh"
      "verify-non-mutating-validation.sh"
      "verify-pkg-names.sh"
      "verify-readonly-packages.sh"
      "verify-spelling.sh"
      "verify-staging-client-go.sh"
      "verify-staging-meta-files.sh"
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 07 12:24:15 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  10. pkg/controlplane/apiserver/options/options.go

    	s.Metrics.AddFlags(fss.FlagSet("metrics"))
    	logsapi.AddFlags(s.Logs, fss.FlagSet("logs"))
    	s.Traces.AddFlags(fss.FlagSet("traces"))
    
    	// Note: the weird ""+ in below lines seems to be the only way to get gofmt to
    	// arrange these text blocks sensibly. Grrr.
    	fs := fss.FlagSet("misc")
    	fs.DurationVar(&s.EventTTL, "event-ttl", s.EventTTL,
    		"Amount of time to retain events.")
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 27 12:19:56 UTC 2024
    - 15.4K bytes
    - Viewed (0)
Back to top