- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for initRewrite (0.6 sec)
-
src/cmd/gofmt/gofmt_unix_test.go
t.Fatal(err) } info, err := os.Stat(fn) if err != nil { t.Fatal(err) } defer func() { *write = false }() *write = true initParserMode() initRewrite() const maxWeight = 2 << 20 var buf, errBuf strings.Builder s := newSequencer(maxWeight, &buf, &errBuf) s.Add(fileWeight(fn, info), func(r *reporter) error { return processFile(fn, info, nil, r) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 18 12:52:14 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/gofmt/gofmt_test.go
case "-s": *simplifyAST = true case "-stdin": // fake flag - pretend input is from stdin info = nil default: t.Errorf("unrecognized flag name: %s", name) } } initParserMode() initRewrite() const maxWeight = 2 << 20 var buf, errBuf bytes.Buffer s := newSequencer(maxWeight, &buf, &errBuf) s.Add(fileWeight(in, info), func(r *reporter) error { return processFile(in, info, nil, r) })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 19:22:49 UTC 2022 - 4.3K bytes - Viewed (0) -
src/cmd/gofmt/rewrite.go
// license that can be found in the LICENSE file. package main import ( "fmt" "go/ast" "go/parser" "go/token" "os" "reflect" "strings" "unicode" "unicode/utf8" ) func initRewrite() { if *rewriteRule == "" { rewrite = nil // disable any previous rewrite return } f := strings.Split(*rewriteRule, "->") if len(f) != 2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 27 22:07:13 UTC 2023 - 8.1K bytes - Viewed (0)