Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for GoStringer (0.45 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/formatting.go

    import (
    	"fmt"
    
    	fcfmt "k8s.io/apiserver/pkg/util/flowcontrol/format"
    )
    
    var _ fmt.GoStringer = RequestDigest{}
    
    // GoString produces a golang source expression of the value.
    func (rd RequestDigest) GoString() string {
    	return fmt.Sprintf("RequestDigest{RequestInfo: %#+v, User: %#+v}", rd.RequestInfo, rd.User)
    }
    
    var _ fmt.GoStringer = (*priorityLevelState)(nil)
    
    // GoString produces a golang source expression of the value.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 11 03:54:40 UTC 2020
    - 1.3K bytes
    - Viewed (0)
  2. src/vendor/golang.org/x/net/dns/dnsmessage/message.go

    	}
    	return printUint16(uint16(c))
    }
    
    // GoString implements fmt.GoStringer.GoString.
    func (c Class) GoString() string {
    	if n, ok := classNames[c]; ok {
    		return "dnsmessage." + n
    	}
    	return printUint16(uint16(c))
    }
    
    // An OpCode is a DNS operation code.
    type OpCode uint16
    
    // GoString implements fmt.GoStringer.GoString.
    func (o OpCode) GoString() string {
    	return printUint16(uint16(o))
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 09 00:09:40 UTC 2024
    - 69K bytes
    - Viewed (0)
  3. src/fmt/gostringer_example_test.go

    	City    string
    	State   string
    	Country string
    }
    
    // Person has a Name, Age and Address.
    type Person struct {
    	Name string
    	Age  uint
    	Addr *Address
    }
    
    // GoString makes Person satisfy the GoStringer interface.
    // The return value is valid Go code that can be used to reproduce the Person struct.
    func (p Person) GoString() string {
    	if p.Addr != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 06 04:25:17 UTC 2018
    - 1.5K bytes
    - Viewed (0)
  4. src/fmt/print.go

    // such as [Print].
    type Stringer interface {
    	String() string
    }
    
    // GoStringer is implemented by any value that has a GoString method,
    // which defines the Go syntax for that value.
    // The GoString method is used to print values passed as an operand
    // to a %#v format.
    type GoStringer interface {
    	GoString() string
    }
    
    // FormatString returns a string representing the fully qualified formatting
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:22:43 UTC 2024
    - 31.8K bytes
    - Viewed (0)
  5. src/fmt/doc.go

    be invoked. In this case the interpretation of verbs and flags is
    controlled by that implementation.
    
    3. If the %v verb is used with the # flag (%#v) and the operand
    implements the [GoStringer] interface, that will be invoked.
    
    If the format (which is implicitly %v for [Println] etc.) is valid
    for a string (%s %q %x %X), or is %v but not %#v,
    the following two rules apply:
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  6. src/fmt/fmt_test.go

    	{"%v", renamedComplex64(3 + 4i), "(3+4i)"},
    	{"%v", renamedComplex128(4 - 3i), "(4-3i)"},
    
    	// Formatter
    	{"%x", F(1), "<x=F(1)>"},
    	{"%x", G(2), "2"},
    	{"%+v", S{F(4), G(5)}, "{F:<v=F(4)> G:5}"},
    
    	// GoStringer
    	{"%#v", G(6), "GoString(6)"},
    	{"%#v", S{F(7), G(8)}, "fmt_test.S{F:<v=F(7)>, G:GoString(8)}"},
    
    	// %T
    	{"%T", byte(0), "uint8"},
    	{"%T", reflect.ValueOf(nil), "reflect.Value"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:31:55 UTC 2024
    - 58.6K bytes
    - Viewed (0)
  7. src/time/format.go

    			wid = 9
    		}
    		buf = appendInt(buf, int(m1), wid)
    		buf = append(buf, '.')
    		buf = appendInt(buf, int(m2), 9)
    		s += string(buf)
    	}
    	return s
    }
    
    // GoString implements [fmt.GoStringer] and formats t to be printed in Go source
    // code.
    func (t Time) GoString() string {
    	abs := t.abs()
    	year, month, day, _ := absDate(abs, true)
    	hour, minute, second := absClock(abs)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  8. src/cmd/vendor/github.com/ianlancetaylor/demangle/ast.go

    	// copy function will only return non-nil for AST values that
    	// need to change.
    	// Copy itself returns either a copy or nil.
    	Copy(copy func(AST) AST, skip func(AST) bool) AST
    
    	// Implement the fmt.GoStringer interface.
    	GoString() string
    	goString(indent int, field string) string
    }
    
    // ASTToString returns the demangled name of the AST.
    func ASTToString(a AST, options ...Option) string {
    	tparams := true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 105.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"Formatter", Type, 0},
    		{"Fprint", Func, 0},
    		{"Fprintf", Func, 0},
    		{"Fprintln", Func, 0},
    		{"Fscan", Func, 0},
    		{"Fscanf", Func, 0},
    		{"Fscanln", Func, 0},
    		{"GoStringer", Type, 0},
    		{"Print", Func, 0},
    		{"Printf", Func, 0},
    		{"Println", Func, 0},
    		{"Scan", Func, 0},
    		{"ScanState", Type, 0},
    		{"Scanf", Func, 0},
    		{"Scanln", Func, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  10. api/go1.txt

    pkg fmt, func Sscanln(string, ...interface{}) (int, error)
    pkg fmt, type Formatter interface { Format }
    pkg fmt, type Formatter interface, Format(State, int32)
    pkg fmt, type GoStringer interface { GoString }
    pkg fmt, type GoStringer interface, GoString() string
    pkg fmt, type ScanState interface { Read, ReadRune, SkipSpace, Token, UnreadRune, Width }
    pkg fmt, type ScanState interface, Read([]uint8) (int, error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
Back to top