Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 754 for qprint (0.17 sec)

  1. src/cmd/vet/testdata/print/print.go

    	Printf("%p", &notPercentDV) // Works regardless: we print it as a pointer.
    	Printf("%q", &percentDV)    // ERROR "Printf format %q has arg &percentDV of wrong type \*.*print.percentDStruct"
    	Printf("%s", percentSV)
    	Printf("%s", &percentSV)
    	// Good argument reorderings.
    	Printf("%[1]d", 3)
    	Printf("%[1]*d", 3, 1)
    	Printf("%[2]*[1]d", 1, 3)
    	Printf("%[2]*.[1]*[3]d", 2, 3, 4)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 27.5K bytes
    - Viewed (0)
  2. src/fmt/print.go

    // It returns the number of bytes written and any write error encountered.
    func Print(a ...any) (n int, err error) {
    	return Fprint(os.Stdout, a...)
    }
    
    // Sprint formats using the default formats for its operands and returns the resulting string.
    // Spaces are added between operands when neither is a string.
    func Sprint(a ...any) string {
    	p := newPrinter()
    	p.doPrint(a)
    	s := string(p.buf)
    	p.free()
    	return s
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ir/fmt.go

    		fmt.Fprint(s, "[")
    		if n.Low != nil {
    			fmt.Fprint(s, n.Low)
    		}
    		fmt.Fprint(s, ":")
    		if n.High != nil {
    			fmt.Fprint(s, n.High)
    		}
    		if n.Op().IsSlice3() {
    			fmt.Fprint(s, ":")
    			if n.Max != nil {
    				fmt.Fprint(s, n.Max)
    			}
    		}
    		fmt.Fprint(s, "]")
    
    	case OSLICEHEADER:
    		n := n.(*SliceHeaderExpr)
    		fmt.Fprintf(s, "sliceheader{%v,%v,%v}", n.Ptr, n.Len, n.Cap)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    // to learn whether a function behaves like fmt.Print or fmt.Printf.
    type Result struct {
    	funcs map[*types.Func]Kind
    }
    
    // Kind reports whether fn behaves like fmt.Print or fmt.Printf.
    func (r *Result) Kind(fn *types.Func) Kind {
    	_, ok := isPrint[fn.FullName()]
    	if !ok {
    		// Next look up just "printf", for use with -printf.funcs.
    		_, ok = isPrint[strings.ToLower(fn.Name())]
    	}
    	if ok {
    		if strings.HasSuffix(fn.Name(), "f") {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  5. src/fmt/example_test.go

    // prints, while Print adds blanks only between non-string arguments and Printf
    // does exactly what it is told.
    // Sprint, Sprintln, Sprintf, Fprint, Fprintln, and Fprintf behave the same as
    // their corresponding Print, Println, and Printf functions shown here.
    func Example_printers() {
    	a, b := 3.0, 4.0
    	h := math.Hypot(a, b)
    
    	// Print inserts blanks between arguments when neither is a string.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 21:03:10 UTC 2019
    - 11.8K bytes
    - Viewed (0)
  6. staging/src/k8s.io/cli-runtime/pkg/printers/tableprinter.go

    	for _, row := range rows {
    		if len(eventType) > 0 {
    			fmt.Fprint(output, formatEventType(eventType))
    			fmt.Fprint(output, "\t")
    		}
    		if options.WithNamespace {
    			if obj := row.Object.Object; obj != nil {
    				if m, err := meta.Accessor(obj); err == nil {
    					fmt.Fprint(output, m.GetNamespace())
    				}
    			}
    			fmt.Fprint(output, "\t")
    		}
    
    		for i, cell := range row.Cells {
    			if i != 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Oct 30 15:08:43 UTC 2022
    - 16.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/fmt.go

    func tconv2(b *bytes.Buffer, t *Type, verb rune, mode fmtMode, visited map[*Type]int) {
    	if off, ok := visited[t]; ok {
    		// We've seen this type before, so we're trying to print it recursively.
    		// Print a reference to it instead.
    		fmt.Fprintf(b, "@%d", off)
    		return
    	}
    	if t == nil {
    		b.WriteString("<T>")
    		return
    	}
    	if t.Kind() == TSSA {
    		b.WriteString(t.extra.(string))
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 15:41:17 UTC 2023
    - 15.7K bytes
    - Viewed (0)
  8. src/go/printer/printer_test.go

    	}
    
    	cfg := &Config{
    		Mode:     SourcePos, // emit line comments
    		Tabwidth: 8,
    	}
    	var buf bytes.Buffer
    	if err := cfg.Fprint(&buf, fset, f); err == nil {
    		t.Errorf("Fprint did not error for source file path containing newline")
    	}
    	if buf.Len() != 0 {
    		t.Errorf("unexpected Fprint output:\n%s", buf.Bytes())
    	}
    }
    
    // TestEmptyDecl tests that empty decls for const, var, import are printed with
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  9. src/strconv/isprint.go

    // Copyright 2013 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Code generated by go run makeisprint.go -output isprint.go; DO NOT EDIT.
    
    package strconv
    
    // (424+133+112)*2 + (508)*4 = 3370 bytes
    
    var isPrint16 = []uint16{
    	0x0020, 0x007e,
    	0x00a1, 0x0377,
    	0x037a, 0x037f,
    	0x0384, 0x0556,
    	0x0559, 0x058a,
    	0x058d, 0x05c7,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 04:29:53 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  10. src/cmd/internal/obj/util.go

    			fmt.Fprintf(w, "$%d", a.Offset)
    		} else {
    			fmt.Fprintf(w, "$%d-%d", a.Offset, a.Val.(int32))
    		}
    
    	case TYPE_FCONST:
    		str := fmt.Sprintf("%.17g", a.Val.(float64))
    		// Make sure 1 prints as 1.0
    		if !strings.ContainsAny(str, ".e") {
    			str += ".0"
    		}
    		fmt.Fprintf(w, "$(%s)", str)
    
    	case TYPE_SCONST:
    		fmt.Fprintf(w, "$%q", a.Val.(string))
    
    	case TYPE_ADDR:
    		io.WriteString(w, "$")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 15:44:14 UTC 2024
    - 17.5K bytes
    - Viewed (0)
Back to top