Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 116 for gofmt (0.04 sec)

  1. src/cmd/compile/internal/test/testdata/gen/arithBoundaryGen.go

    				fmt.Fprint(w, "\n}\n")
    			}
    
    			if err != nil {
    				panic(err)
    			}
    
    		}
    		fmt.Fprint(w, "    }\n")
    	}
    
    	fmt.Fprintf(w, "}\n")
    
    	// gofmt result
    	b := w.Bytes()
    	src, err := format.Source(b)
    	if err != nil {
    		fmt.Printf("%s\n", b)
    		panic(err)
    	}
    
    	// write to file
    	err = os.WriteFile("../arithBoundary_test.go", src, 0666)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  2. 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)
  3. src/go/parser/error_test.go

    // directory are parsed and the errors reported are compared against the
    // error messages expected in the test files. The test files must end in
    // .src rather than .go so that they are not disturbed by gofmt runs.
    //
    // Expected errors are indicated in the test files by putting a comment
    // of the form /* ERROR "rx" */ immediately following an offending token.
    // The harness will verify that an error matching the regular expression
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 19:47:49 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  4. 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)
  5. src/cmd/cover/cover_test.go

    		lines[i] = bytes.ReplaceAll(line, []byte("LINE"), []byte(fmt.Sprint(i+1)))
    	}
    
    	// Add a function that is not gofmt'ed. This used to cause a crash.
    	// We don't put it in test.go because then we would have to gofmt it.
    	// Issue 23927.
    	lines = append(lines, []byte("func unFormatted() {"),
    		[]byte("\tif true {"),
    		[]byte("\t}else{"),
    		[]byte("\t}"),
    		[]byte("}"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:28 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/allocators.go

    		genAllocator(w, a)
    	}
    	for _, d := range deriveds {
    		for _, base := range allocators {
    			if base.name == d.base {
    				genDerived(w, d, base)
    				break
    			}
    		}
    	}
    	// gofmt result
    	b := w.Bytes()
    	var err error
    	b, err = format.Source(b)
    	if err != nil {
    		fmt.Printf("%s\n", w.Bytes())
    		panic(err)
    	}
    
    	if err := os.WriteFile("../allocators.go", b, 0666); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 23:34:11 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  7. src/go/doc/comment/print.go

    		}
    		cp.block(&out, x)
    	}
    
    	// Print one block containing all the link definitions that were used,
    	// and then a second block containing all the unused ones.
    	// This makes it easy to clean up the unused ones: gofmt and
    	// delete the final block. And it's a nice visual signal without
    	// affecting the way the comment formats for users.
    	for i := 0; i < 2; i++ {
    		used := i == 0
    		first := true
    		for _, def := range d.Links {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  8. src/go/printer/printer.go

    // unexported, it's also possible to modify or remove it based on
    // the evolving needs of go/format and cmd/gofmt without breaking
    // users. See discussion in CL 240683.
    const (
    	// normalizeNumbers means to canonicalize number
    	// literal prefixes and exponents while printing.
    	//
    	// This value is known in and used by go/format and cmd/gofmt.
    	// It is currently more convenient and performant for those
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/test/testdata/gen/cmpConstGen.go

    		fmt.Fprintf(w, "		}\n")
    		fmt.Fprintf(w, "	}\n")
    		fmt.Fprintf(w, "}\n")
    	}
    	fmt.Fprintf(w, "}\n")
    
    	// gofmt result
    	b := w.Bytes()
    	src, err := format.Source(b)
    	if err != nil {
    		fmt.Printf("%s\n", b)
    		panic(err)
    	}
    
    	// write to file
    	err = os.WriteFile("../cmpConst_test.go", src, 0666)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 6.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/testdata/gen/arithConstGen.go

    		w.WriteString(`if got := test.fn(test.in); got != test.want {
    			t.Errorf("%s(%d) = %d, want %d\n", test.fnname, test.in, got, test.want)
    		}
    	}
    `)
    	}
    
    	fmt.Fprint(w, `
    }
    `)
    
    	// gofmt result
    	b := w.Bytes()
    	src, err := format.Source(b)
    	if err != nil {
    		fmt.Printf("%s\n", b)
    		panic(err)
    	}
    
    	// write to file
    	err = os.WriteFile("../arithConst_test.go", src, 0666)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 8.3K bytes
    - Viewed (0)
Back to top