- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 55 for gofmt (0.27 sec)
-
src/os/exec/exec_test.go
} func TestAbsPathExec(t *testing.T) { testenv.MustHaveExec(t) testenv.MustHaveGoBuild(t) // must have GOROOT/bin/gofmt, but close enough // A simple exec of a full path should work. // Go 1.22 broke this on Windows, requiring ".exe"; see #66586. exe := filepath.Join(testenv.GOROOT(t), "bin/gofmt") cmd := exec.Command(exe) if cmd.Path != exe { t.Errorf("exec.Command(%#q) set Path=%#q", exe, cmd.Path) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 20:13:53 UTC 2024 - 48.4K bytes - Viewed (0) -
src/cmd/internal/src/pos.go
// user debugging a program; the goal is that a breakpoint set on the loop line fires both on entry // and on iteration). Proper treatment of non-gofmt input with multiple simple statements on a single // line is TBD. // // Optimizing compilation will move instructions around, and some of these will become known-bad as
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 15.5K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
error_(r.Pos(), "must call C.%s", fixGo(r.Name.Go)) } } return expr } // gofmtPos returns the gofmt-formatted string for an AST node, // with a comment setting the position before the node. func gofmtPos(n ast.Expr, pos token.Pos) string { s := gofmt(n) p := fset.Position(pos) if p.Column == 0 { return s } return fmt.Sprintf("/*line :%d:%d*/%s", p.Line, p.Column, s) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0) -
src/go/token/position.go
// // With better compiler optimizations, this may not be needed in the // future, but at the moment this change improves the go/printer // benchmark performance by ~30%. This has a direct impact on the // speed of gofmt and thus seems worthwhile (2011-04-29). // TODO(gri): Remove this when compilers have caught up. i, j := 0, len(a) for i < j { h := int(uint(i+j) >> 1) // avoid overflow when computing h // i ≤ h < j
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 19.7K bytes - Viewed (0) -
src/go/doc/example.go
copy(imps, origImps) // Assume the imports are sorted by position. slices.SortFunc(imps, func(a, b *ast.ImportSpec) int { return cmp.Compare(a.Pos(), b.Pos()) }) // Assume gofmt has been applied, so there is a blank line between adjacent imps // if and only if they are more than 2 positions apart (newline, tab). var groupStarts []*ast.ImportSpec prevEnd := token.Pos(-2) for _, imp := range imps {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 21.4K bytes - Viewed (0) -
src/cmd/dist/build.go
checkNotStale(toolenv(), goBootstrap, toolchain...) copyfile(pathf("%s/compile4", tooldir), pathf("%s/compile", tooldir), writeExec) } // Check that there are no new files in $GOROOT/bin other than // go and gofmt and $GOOS_$GOARCH (target bin when cross-compiling). binFiles, err := filepath.Glob(pathf("%s/bin/*", goroot)) if err != nil { fatalf("glob: %v", err) } ok := map[string]bool{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 18:34:40 UTC 2024 - 54K bytes - Viewed (0) -
src/cmd/cover/cover.go
fmt.Fprintf(w, "}\n") } // It is possible for positions to repeat when there is a line // directive that does not specify column information and the input // has not been passed through gofmt. // See issues #27530 and #30746. // Tests are TestHtmlUnformatted and TestLineDup. // We use a map to avoid duplicates. // pos2 is a pair of token.Position values, used as a map key type. type pos2 struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 34.5K bytes - Viewed (0) -
pkg/features/kube_features.go
// To add a new feature, define a key for it above and add it here. The features will be // available throughout Kubernetes binaries. // // Entries are separated from each other with blank lines to avoid sweeping gofmt changes // when adding or removing one entry. var defaultKubernetesFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ CrossNamespaceVolumeDataSource: {Default: false, PreRelease: featuregate.Alpha},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 22:51:23 UTC 2024 - 45.2K bytes - Viewed (0) -
hack/tools/go.sum
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= github.com/golangci/golangci-lint v1.56.2 h1:dgQzlWHgNbCqJjuxRJhFEnHDVrrjuTGQHJ3RIZMpp/o=
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 07 08:12:16 UTC 2024 - 93.1K bytes - Viewed (0) -
src/cmd/go/internal/help/helpdoc.go
building the package for Windows; similarly, math_386.s will be included only when building the package for 32-bit x86. Go versions 1.16 and earlier used a different syntax for build constraints, with a "// +build" prefix. The gofmt command will add an equivalent //go:build constraint when encountering the older syntax. `,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 11 16:54:28 UTC 2024 - 36.3K bytes - Viewed (0)