Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for recv3 (0.05 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/recv.go

    	"golang.org/x/tools/internal/aliases"
    )
    
    // ReceiverNamed returns the named type (if any) associated with the
    // type of recv, which may be of the form N or *N, or aliases thereof.
    // It also reports whether a Pointer was present.
    func ReceiverNamed(recv *types.Var) (isPtr bool, named *types.Named) {
    	t := recv.Type()
    	if ptr, ok := aliases.Unalias(t).(*types.Pointer); ok {
    		isPtr = true
    		t = ptr.Elem()
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/internal/stdlib/stdlib.go

    //
    // Example: "(*Buffer).Grow" -> (true, "Buffer", "Grow")
    func (sym *Symbol) SplitMethod() (ptr bool, recv, name string) {
    	if sym.Kind != Method {
    		panic("not a method")
    	}
    	recv, name, _ = strings.Cut(sym.Name, ".")
    	recv = recv[len("(") : len(recv)-len(")")]
    	ptr = recv[0] == '*'
    	if ptr {
    		recv = recv[len("*"):]
    	}
    	return
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/selection.go

    func (s *Selection) Type() Type {
    	switch s.kind {
    	case MethodVal:
    		// The type of x.f is a method with its receiver type set
    		// to the type of x.
    		sig := *s.obj.(*Func).typ.(*Signature)
    		recv := *sig.recv
    		recv.typ = s.recv
    		sig.recv = &recv
    		return &sig
    
    	case MethodExpr:
    		// The type of x.f is a function (without receiver)
    		// and an additional first argument with the same type as x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  4. src/go/types/selection.go

    func (s *Selection) Type() Type {
    	switch s.kind {
    	case MethodVal:
    		// The type of x.f is a method with its receiver type set
    		// to the type of x.
    		sig := *s.obj.(*Func).typ.(*Signature)
    		recv := *sig.recv
    		recv.typ = s.recv
    		sig.recv = &recv
    		return &sig
    
    	case MethodExpr:
    		// The type of x.f is a function (without receiver)
    		// and an additional first argument with the same type as x.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    		argidx := -1
    
    		recv := fn.Type().(*types.Signature).Recv()
    		if fn.Name() == "Unmarshal" && recv == nil {
    			// "encoding/json".Unmarshal
    			// "encoding/xml".Unmarshal
    			// "encoding/asn1".Unmarshal
    			switch fn.Pkg().Path() {
    			case "encoding/json", "encoding/xml", "encoding/asn1":
    				argidx = 1 // func([]byte, interface{})
    			}
    		} else if fn.Name() == "Decode" && recv != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/slog/slog.go

    //	"slog.Logger.With" (instead of "(*log/slog.Logger).With")
    func shortName(fn *types.Func) string {
    	var r string
    	if recv := fn.Type().(*types.Signature).Recv(); recv != nil {
    		if _, named := typesinternal.ReceiverNamed(recv); named != nil {
    			r = named.Obj().Name()
    		} else {
    			r = recv.Type().String() // anon struct/interface
    		}
    		r += "."
    	}
    	return fmt.Sprintf("%s.%s%s", fn.Pkg().Name(), r, fn.Name())
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. src/go/doc/comment/testdata_test.go

    		if name == "comment" {
    			return "go/doc/comment", true
    		}
    		return DefaultLookupPackage(name)
    	}
    	p.LookupSym = func(recv, name string) (ok bool) {
    		if recv == "Parser" && name == "Parse" ||
    			recv == "" && name == "Doc" ||
    			recv == "" && name == "NoURL" {
    			return true
    		}
    		return false
    	}
    
    	stripDollars := func(b []byte) []byte {
    		// Remove trailing $ on lines.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    func isTimeDotFormat(f *types.Func) bool {
    	if f.Name() != "Format" || f.Pkg() == nil || f.Pkg().Path() != "time" {
    		return false
    	}
    	// Verify that the receiver is time.Time.
    	recv := f.Type().(*types.Signature).Recv()
    	return recv != nil && analysisutil.IsNamedType(recv.Type(), "time", "Time")
    }
    
    func isTimeDotParse(f *types.Func) bool {
    	return analysisutil.IsFunctionNamed(f, "time", "Parse")
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  9. src/runtime/sigqueue.go

    //
    //go:linkname signal_recv os/signal.signal_recv
    func signal_recv() uint32 {
    	for {
    		// Serve any signals from local copy.
    		for i := uint32(0); i < _NSIG; i++ {
    			if sig.recv[i/32]&(1<<(i&31)) != 0 {
    				sig.recv[i/32] &^= 1 << (i & 31)
    				return i
    			}
    		}
    
    		// Wait for updates to be available from signal sender.
    	Receive:
    		for {
    			switch sig.state.Load() {
    			default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  10. pkg/istio-agent/tap_proxy.go

    }
    
    const (
    	TypeDebugPrefix = "istio.io/debug/"
    )
    
    func (p *tapProxy) StreamAggregatedResources(downstream DiscoveryStream) error {
    	timeout := time.Second * 15
    	req, err := downstream.Recv()
    	if err != nil {
    		log.Errorf("failed to recv: %v", err)
    		return err
    	}
    	if strings.HasPrefix(req.TypeUrl, TypeDebugPrefix) {
    		if resp, err := p.xdsProxy.tapRequest(req, timeout); err == nil {
    			err := downstream.Send(resp)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 04 20:29:08 UTC 2024
    - 1.9K bytes
    - Viewed (0)
Back to top