Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 116 for gofmt (0.03 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. src/cmd/fix/typecheck.go

    			if isTopName(n.Fun, "make") && len(n.Args) >= 1 {
    				typeof[n] = gofmt(n.Args[0])
    				return
    			}
    			// new(T) has type *T
    			if isTopName(n.Fun, "new") && len(n.Args) == 1 {
    				typeof[n] = "*" + gofmt(n.Args[0])
    				return
    			}
    			// Otherwise, use type of function to determine arguments.
    			t := typeof[n.Fun]
    			if t == "" {
    				t = cfg.External[gofmt(n.Fun)]
    			}
    			in, out := splitFunc(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 16 22:02:42 UTC 2022
    - 20.1K bytes
    - Viewed (0)
  6. 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)
  7. src/cmd/go/testdata/mod/golang.org_toolchain_v0.0.1-go1.999testmod.aix-ppc64.txt

    -- .mod --
    module golang.org/toolchain
    -- .info --
    {"Version":"v0.0.1-go1.999testmod.aix-ppc64"}
    -- 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: Tue Apr 18 13:19:02 UTC 2023
    - 294 bytes
    - Viewed (0)
  8. src/cmd/go/testdata/mod/golang.org_toolchain_v0.0.1-go1.999testmod.netbsd-arm.txt

    -- .mod --
    module golang.org/toolchain
    -- .info --
    {"Version":"v0.0.1-go1.999testmod.netbsd-arm"}
    -- 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: Tue Apr 18 13:19:02 UTC 2023
    - 296 bytes
    - Viewed (0)
  9. src/cmd/go/testdata/mod/golang.org_toolchain_v0.0.1-go1.999testmod.openbsd-386.txt

    -- .mod --
    module golang.org/toolchain
    -- .info --
    {"Version":"v0.0.1-go1.999testmod.openbsd-386"}
    -- 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: Tue Apr 18 13:19:02 UTC 2023
    - 298 bytes
    - Viewed (0)
  10. 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)
Back to top