Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cap (0.01 sec)

  1. cmd/storage-datatypes_gen.go

    		}
    		switch msgp.UnsafeString(field) {
    		case "r":
    			var zb0002 uint32
    			zb0002, err = dc.ReadArrayHeader()
    			if err != nil {
    				err = msgp.WrapError(err, "Results")
    				return
    			}
    			if cap(z.Results) >= int(zb0002) {
    				z.Results = (z.Results)[:zb0002]
    			} else {
    				z.Results = make([]int, zb0002)
    			}
    			for za0001 := range z.Results {
    				z.Results[za0001], err = dc.ReadInt()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 150.2K bytes
    - Viewed (0)
  2. doc/go1.17_spec.html

    </p>
    
    <pre>
    s := make([]int, 10, 100)       // slice with len(s) == 10, cap(s) == 100
    s := make([]int, 1e3)           // slice with len(s) == cap(s) == 1000
    s := make([]int, 1&lt;&lt;63)         // illegal: len(s) is not representable by a value of type int
    s := make([]int, 10, 0)         // illegal: len(s) > cap(s)
    c := make(chan int, 10)         // channel with a buffer size of 10
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 10 18:25:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
Back to top