Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 164 for gofmt (0.05 sec)

  1. src/internal/types/testdata/spec/range.go

    func f7(func(int) MyBool)             {}
    func f8(func(MyInt, MyString) MyBool) {}
    
    func test() {
    	// TODO: Would be nice to 'for range T.M' and 'for range (*T).PM' directly,
    	// but there is no gofmt-friendly way to write the error pattern in the right place.
    	m1 := T.M
    	for range m1 /* ERROR "cannot range over m1 (variable of type func(T)): func must be func(yield func(...) bool): argument is not func" */ {
    	}
    	m2 := (*T).PM
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 26 04:31:42 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/go/printer/testdata/comments.golden

    var _ = []T{
    	// lone comments
    	// in composite lit
    }
    
    var _ = [][]T{
    	{
    		// lone comments
    		// in composite lit
    	},
    }
    
    // TODO: gofmt doesn't add these tabs; make it so that these golden
    // tests run the printer in a way that it's exactly like gofmt.
    
    var _ = []T{	// lone comment
    }
    
    var _ = []T{	// lone comments
    	// in composite lit
    }
    
    func _()	{}
    
    func _()	{}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 23:11:14 UTC 2022
    - 11.3K bytes
    - Viewed (0)
  5. src/go/doc/comment/testdata_test.go

    					want = want[:len(want)-1]
    				}
    				var out []byte
    				switch f.Name {
    				default:
    					t.Fatalf("unknown output file %q", f.Name)
    				case "dump":
    					out = dump(d)
    				case "gofmt":
    					out = pr.Comment(d)
    				case "html":
    					out = pr.HTML(d)
    				case "markdown":
    					out = pr.Markdown(d)
    				case "text":
    					out = pr.Text(d)
    				}
    				if string(out) != string(want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/test/testdata/gen/zeroGen.go

    	for _, s := range sizes {
    		fmt.Fprintf(w, "  testZero%d(t)\n", s)
    	}
    	for _, s := range usizes {
    		fmt.Fprintf(w, "  testZero%du(t)\n", s)
    	}
    	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("../zero_test.go", src, 0666)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  7. 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)
  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. src/go/printer/testdata/comments.input

    var _ = []T{
    // lone comments
    // in composite lit
    }
    
    var _ = [][]T{
    	{
    		// lone comments
    		// in composite lit
    	},
    }
    
    // TODO: gofmt doesn't add these tabs; make it so that these golden
    // tests run the printer in a way that it's exactly like gofmt.
    
    var _ = []T{// lone comment
    }
    
    var _ = []T{// lone comments
    // in composite lit
    }
    
    func _() {}
    
    //
    func _() {}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 23:11:14 UTC 2022
    - 11.3K bytes
    - Viewed (0)
  10. 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)
Back to top