- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for gofmt (0.04 sec)
-
hack/verify-gofmt.sh
# limitations under the License. # This script checks whether the source code needs to be formatted or not by # `gofmt`. Run `hack/update-gofmt.sh` to actually format sources. # # Note: gofmt output can change between go versions. # # Usage: `hack/verify-gofmt.sh`. set -o errexit set -o nounset set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/hack/lib/init.sh"
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:07:31 UTC 2024 - 1.8K bytes - Viewed (0) -
hack/update-gofmt.sh
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # GoFmt apparently is changing @ head... set -o errexit set -o nounset set -o pipefail KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::setup_env
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:56 UTC 2024 - 1.4K bytes - Viewed (0) -
src/regexp/syntax/make_perl_groups.pl
} print "}\n"; my $count = @entries; } # Prepare gofmt command my $gofmt; if (@ARGV > 0 && $ARGV[0] =~ /\.go$/) { # Send the output of gofmt to the given file open($gofmt, '|-', 'gofmt >'.$ARGV[0]) or die; } else { open($gofmt, '|-', 'gofmt') or die; } # Redirect STDOUT to gofmt input select $gofmt; print <<EOF; // Copyright 2013 The Go Authors. All rights reserved.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 13:59:01 UTC 2024 - 2.6K bytes - Viewed (0) -
src/cmd/gofmt/long_test.go
fmt.Fprintf(os.Stderr, "ignoring %s\n", err) } return } // gofmt file if err = gofmt(fset, filename, b1); err != nil { t.Errorf("1st gofmt failed: %v", err) return } // make a copy of the result b2.Reset() b2.Write(b1.Bytes()) // gofmt result again if err = gofmt(fset, filename, b2); err != nil { t.Errorf("2nd gofmt failed: %v", err) return }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 20:27:28 UTC 2023 - 3.8K bytes - Viewed (0) -
src/go/doc/comment/testdata/README.md
The remaining files contain the expected output for the named format generated by [comment.Printer](https://pkg.go.dev/go/doc/comment/#Printer): “gofmt” for Printer.Comment (Go comment format, as used by gofmt), “html” for Printer.HTML, “markdown” for Printer.Markdown, and “text” for Printer.Text. The format can also be “dump” for a textual dump of the raw data structures.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 1.3K bytes - Viewed (0) -
src/go/format/format.go
"io" ) // Keep these in sync with cmd/gofmt/gofmt.go. const ( tabWidth = 8 printerMode = printer.UseSpaces | printer.TabIndent | printerNormalizeNumbers // 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 )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 4.3K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic/atomic.go
if len(call.Args) != 2 { return } arg := call.Args[0] broken := false gofmt := func(e ast.Expr) string { return analysisutil.Format(pass.Fset, e) } if uarg, ok := arg.(*ast.UnaryExpr); ok && uarg.Op == token.AND { broken = gofmt(left) == gofmt(uarg.X) } else if star, ok := left.(*ast.StarExpr); ok { broken = gofmt(star.X) == gofmt(arg) } if broken { pass.ReportRangef(left, "direct assignment to atomic value")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 2.3K bytes - Viewed (0) -
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) -
src/go/parser/testdata/typeset.go2
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file contains test cases for typeset-only constraint elements. // TODO(gri) gofmt once/if gofmt supports this notation. package p type ( _[_ t] t _[_ ~t] t _[_ t|t] t _[_ ~t|t] t _[_ t|~t] t _[_ ~t|~t] t _[_ t, _, _ t|t] t
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 12:56:53 UTC 2023 - 1.9K bytes - Viewed (0) -
src/cmd/go/testdata/mod/golang.org_toolchain_v0.0.1-go1.999testmod.openbsd-riscv64.txt
-- .mod -- module golang.org/toolchain -- .info -- {"Version":"v0.0.1-go1.999testmod.openbsd-riscv64"} -- go.mod -- module golang.org/toolchain -- bin/go -- #!/bin/sh echo go1.999testmod here! -- bin/gofmt -- echo i am unused
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 04 02:55:49 UTC 2023 - 306 bytes - Viewed (0)