Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 8,288 for makeN (0.05 sec)

  1. test/typeparam/setsimp.dir/a.go

    				return false
    			}
    		}
    	}
    	return true
    }
    
    // A Set is a set of elements of some type.
    type Set[Elem comparable] struct {
    	m map[Elem]struct{}
    }
    
    // Make makes a new set.
    func Make[Elem comparable]() Set[Elem] {
    	return Set[Elem]{m: make(map[Elem]struct{})}
    }
    
    // Add adds an element to a set.
    func (s Set[Elem]) Add(v Elem) {
    	s.m[v] = struct{}{}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 26 21:39:54 UTC 2021
    - 2.7K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testsanitizers/testdata/tsan10.go

    // Since the Go runtime makes direct futex syscalls, Go runtime threads could
    // run for an arbitrarily long time without triggering the libc interceptors.
    // See https://golang.org/issue/18717.
    
    import (
    	"os"
    	"os/signal"
    	"syscall"
    )
    
    /*
    #cgo CFLAGS: -g -fsanitize=thread
    #cgo LDFLAGS: -g -fsanitize=thread
    */
    import "C"
    
    func main() {
    	c := make(chan os.Signal, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 798 bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/pprof_callback.go

    	// execute, when updating mp.curg.
    	//
    	// These are reachable only when exitsyscall finds no P available. Thus
    	// we make C calls from significantly more Gs than there are available
    	// Ps. Lots of runnable work combined with >20us spent in callGo makes
    	// it possible for sysmon to retake Ps, forcing C calls to go down the
    	// desired exitsyscall path.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 08 15:44:05 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  4. src/cmd/fix/doc.go

    Fix prints the full list of fixes it can apply in its help output;
    to see them, run go tool fix -help.
    
    Fix does not make backup copies of the files that it edits.
    Instead, use a version control system's “diff” functionality to inspect
    the changes that fix makes before committing them.
    */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  5. src/cmd/internal/objabi/path.go

    // symbol table. All control characters, space, '%' and '"', as well as
    // non-7-bit clean bytes turn into %xx. The period needs escaping only in the
    // last segment of the path, and it makes for happier users if we escape that as
    // little as possible.
    func PathToPrefix(s string) string {
    	slash := strings.LastIndex(s, "/")
    	// check for chars that need escaping
    	n := 0
    	for r := 0; r < len(s); r++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 13:56:25 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/test_chatty_parallel_success.txt

    	parallel := flag.Lookup("test.parallel").Value.(flag.Getter).Get().(int)
    
    	// ready is a synchronization mechanism that causes subtests to execute
    	// round robin.
    	ready := make([]chan bool, parallel)
    	for i := range ready {
    		ready[i] = make(chan bool, 1)
    	}
    	ready[0] <- true
    
    	for i := range ready {
    		i := i
    		t.Run(fmt.Sprintf("sub-%d", i), func(t *testing.T) {
    			t.Parallel()
    			for j := 0; j < 2; j++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 19:50:36 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  7. src/archive/tar/writer_test.go

    		var fw fileWriter
    		switch maker := v.maker.(type) {
    		case makeReg:
    			fw = &regFileWriter{w, maker.size}
    			wantStr = maker.wantStr
    		case makeSparse:
    			if !validateSparseEntries(maker.sph, maker.size) {
    				t.Fatalf("invalid sparse map: %v", maker.sph)
    			}
    			spd := invertSparseEntries(maker.sph, maker.size)
    			fw = &regFileWriter{w, maker.makeReg.size}
    			fw = &sparseFileWriter{fw, spd, 0}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 38.7K bytes
    - Viewed (0)
  8. src/runtime/pprof/label.go

    // and makes a [LabelSet] containing them.
    // A label overwrites a prior label with the same key.
    // Currently only the CPU and goroutine profiles utilize any labels
    // information.
    // See https://golang.org/issue/23458 for details.
    func Labels(args ...string) LabelSet {
    	if len(args)%2 != 0 {
    		panic("uneven number of arguments to pprof.Labels")
    	}
    	list := make([]label, 0, len(args)/2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/plugins/schedulinggates/scheduling_gates.go

    		return nil
    	}
    	gates := make([]string, 0, len(p.Spec.SchedulingGates))
    	for _, gate := range p.Spec.SchedulingGates {
    		gates = append(gates, gate.Name)
    	}
    	return framework.NewStatus(framework.UnschedulableAndUnresolvable, fmt.Sprintf("waiting for scheduling gates: %v", gates))
    }
    
    // EventsToRegister returns the possible events that may make a Pod
    // failed by this plugin schedulable.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. mockwebserver/README.md

    MockWebServer
    =============
    
    A scriptable web server for testing HTTP clients
    
    
    ### Motivation
    
    This library makes it easy to test that your app Does The Right Thing when it
    makes HTTP and HTTPS calls. It lets you specify which responses to return and
    then verify that requests were made as expected.
    
    Because it exercises your full HTTP stack, you can be confident that you're
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sun Dec 17 15:34:10 UTC 2023
    - 5K bytes
    - Viewed (0)
Back to top