Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for gofmt (0.03 sec)

  1. src/cmd/gofmt/gofmt.go

    	// 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
    )
    
    // fdSem guards the number of concurrently-open file descriptors.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/distpack/test.go

    	{name: "go/bin/go", goos: "darwin"},
    	{name: "go/bin/go", goos: "windows", exclude: true},
    	{name: "go/bin/go.exe", goos: "windows"},
    	{name: "go/bin/gofmt", goos: "linux"},
    	{name: "go/bin/gofmt", goos: "darwin"},
    	{name: "go/bin/gofmt", goos: "windows", exclude: true},
    	{name: "go/bin/gofmt.exe", goos: "windows"},
    	{name: "go/pkg/tool/*/compile", goos: "linux"},
    	{name: "go/pkg/tool/*/compile", goos: "darwin"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 22:29:19 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top