Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 113 for newD (0.26 sec)

  1. test/fixedbugs/issue59680.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"sync"
    	"time"
    )
    
    type B struct {
    	pid int
    	f   func() (uint64, error)
    	wg  sync.WaitGroup
    	v   uint64
    }
    
    func newB(pid int) *B {
    	return &B{
    		pid: pid,
    	}
    }
    
    //go:noinline
    func Sq(i int) uint64 {
    	S++
    	return uint64(i * i)
    }
    
    type RO func(*B)
    
    var ROSL = []RO{
    	Bad(),
    }
    
    func Bad() RO {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 05 21:04:38 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  2. test/fixedbugs/issue46234.go

    }
    
    type R struct {
    	cM *CM
    }
    
    type CM int
    
    type A string
    
    func (m *CM) NewA(ctx context.Context, cN string, nn *nAO, opts ...NAO) (*A, error) {
    	for _, o := range opts {
    		o(nn)
    	}
    	s := A("foo")
    	return &s, nil
    }
    
    func (r *R) CA(ctx context.Context, cN string, nn *nAO) (*int, error) {
    	cA, err := r.cM.NewA(ctx, cN, nn, WEA(), WEA())
    	if err == nil {
    		return nil, err
    	}
    	println(cA)
    	x := int(42)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. src/internal/fuzz/encoding_test.go

    			}
    			if err != nil {
    				t.Fatalf("unmarshal unexpected error: %v", err)
    			}
    			newB := marshalCorpusFile(vals...)
    			if newB[len(newB)-1] != '\n' {
    				t.Error("didn't write final newline to corpus file")
    			}
    
    			want := test.want
    			if want == "" {
    				want = test.in
    			}
    			want += "\n"
    			got := string(newB)
    			if got != want {
    				t.Errorf("unexpected marshaled value\ngot:\n%s\nwant:\n%s", got, want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. tests/embedded_struct_test.go

    		}
    	}
    
    	// save embedded struct
    	DB.Save(&HNPost{BasePost: BasePost{Title: "news"}})
    	DB.Save(&HNPost{BasePost: BasePost{Title: "hn_news"}})
    	var news HNPost
    	if err := DB.First(&news, "title = ?", "hn_news").Error; err != nil {
    		t.Errorf("no error should happen when query with embedded struct, but got %v", err)
    	} else if news.Title != "hn_news" {
    		t.Errorf("embedded struct's value should be scanned correctly")
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  5. pkg/test/framework/components/echo/config.go

    }
    
    // DeepCopy creates a clone of IstioEndpoint.
    func (c Config) DeepCopy() Config {
    	newc := c
    	newc.Cluster = nil
    	newc = copyInternal(newc).(Config)
    	newc.Cluster = c.Cluster
    	newc.Namespace = c.Namespace
    	return newc
    }
    
    func (c Config) IsExternal() bool {
    	return c.HostHeader() != c.ClusterLocalFQDN()
    }
    
    const (
    	defaultService   = "echo"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 09 12:26:52 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/internal/counter/file.go

    	if v, _, _, _ := current.lookup(name); v != nil {
    		return v, nop
    	}
    	v, newM, err := current.newCounter(name)
    	if err != nil {
    		debugPrintf("newCounter %s: %v\n", name, err)
    		return nil, nop
    	}
    
    	cleanup = nop
    	if newM != nil {
    		f.current.Store(newM)
    		cleanup = f.invalidateCounters
    	}
    	return v, cleanup
    }
    
    // Open associates counting with the defaultFile.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  7. pkg/config/mesh/kubemesh/watcher_test.go

    	stop := test.NewStop(t)
    	w := NewConfigMapWatcher(client, namespace, name, key, false, stop)
    	client.RunAndWait(stop)
    
    	var mu sync.Mutex
    	newM := mesh.DefaultMeshConfig()
    	w.AddMeshHandler(func() {
    		mu.Lock()
    		defer mu.Unlock()
    		newM = w.Mesh()
    	})
    
    	steps := []struct {
    		added   *v1.ConfigMap
    		updated *v1.ConfigMap
    		deleted *v1.ConfigMap
    
    		expect *meshconfig.MeshConfig
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 7.7K bytes
    - Viewed (0)
  8. pkg/apis/admissionregistration/validation/validation.go

    }
    
    func newPreexistingExpressions() preexistingExpressions {
    	return preexistingExpressions{
    		matchConditionExpressions:        sets.New[string](),
    		validationExpressions:            sets.New[string](),
    		validationMessageExpressions:     sets.New[string](),
    		auditAnnotationValuesExpressions: sets.New[string](),
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 56.6K bytes
    - Viewed (0)
  9. test/fixedbugs/issue56778.dir/a.go

    // Copyright 2022 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.
    
    package a
    
    type A struct {
    	New func() any
    }
    
    func NewA(i int) *A {
    	return &A{
    		New: func() any {
    			_ = i
    			return nil
    		},
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 18:31:28 UTC 2022
    - 293 bytes
    - Viewed (0)
  10. src/internal/types/testdata/fixedbugs/issue25838.go

    package p
    
    // examples from the issue
    
    type (
    	e = f
    	f = g
    	g = []h
    	h i
    	i = j
    	j = e
    )
    
    type (
    	e1 = []h1
    	h1 e1
    )
    
    type (
    	P = *T
    	T P
    )
    
    func newA(c funcAlias) A {
    	return A{c: c}
    }
    
    type B struct {
    	a *A
    }
    
    type A struct {
    	c funcAlias
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 430 bytes
    - Viewed (0)
Back to top