Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for reorder (0.18 sec)

  1. src/archive/zip/reader_test.go

    }
    
    func TestReader(t *testing.T) {
    	for _, zt := range tests {
    		t.Run(zt.Name, func(t *testing.T) {
    			readTestZip(t, zt)
    		})
    	}
    }
    
    func readTestZip(t *testing.T, zt ZipTest) {
    	var z *Reader
    	var err error
    	var raw []byte
    	if zt.Source != nil {
    		rat, size := zt.Source()
    		z, err = NewReader(rat, size)
    		raw = make([]byte, size)
    		if _, err := rat.ReadAt(raw, 0); err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Mar 27 18:23:49 GMT 2024
    - 55.3K bytes
    - Viewed (0)
  2. src/cmd/cgo/doc.go

    parsing these is significantly less work and more robust than parsing
    C source.
    
    Cgo first invokes gcc -E -dM on the preamble, in order to find out
    about simple #defines for constants and the like. These are recorded
    for later use.
    
    Next, cgo needs to identify the kinds for each identifier. For the
    identifiers C.foo, cgo generates this C program:
    
    	<preamble>
    	#line 1 "not-declared"
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Sun Mar 31 09:02:45 GMT 2024
    - 42.1K bytes
    - Viewed (0)
  3. src/archive/tar/reader_test.go

    	}
    
    	for i, v := range vectors {
    		for j := 0; j < 6; j++ {
    			var tr *Reader
    			var s1, s2 string
    
    			switch j {
    			case 0:
    				tr = NewReader(&reader{strings.NewReader(v.input)})
    				s1, s2 = "io.Reader", "auto"
    			case 1:
    				tr = NewReader(&reader{strings.NewReader(v.input)})
    				s1, s2 = "io.Reader", "manual"
    			case 2:
    				tr = NewReader(&readSeeker{strings.NewReader(v.input)})
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Nov 21 21:14:38 GMT 2022
    - 47.1K bytes
    - Viewed (0)
  4. src/archive/tar/strconv.go

    	}
    	copy(b, s)
    	if len(s) < len(b) {
    		b[len(s)] = 0
    	}
    
    	// Some buggy readers treat regular files with a trailing slash
    	// in the V7 path field as a directory even though the full path
    	// recorded elsewhere (e.g., via PAX record) contains no trailing slash.
    	if len(s) > len(b) && b[len(b)-1] == '/' {
    		n := len(strings.TrimRight(s[:len(b)-1], "/"))
    		b[n] = 0 // Replace trailing slash with NUL terminator
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 01 14:28:42 GMT 2023
    - 9K bytes
    - Viewed (0)
  5. src/cmd/cgo/gcc.go

    		return s
    	}
    	return fmt.Sprintf("/*line :%d:%d*/%s", p.Line, p.Column, s)
    }
    
    // checkGCCBaseCmd returns the start of the compiler command line.
    // It uses $CC if set, or else $GCC, or else the compiler recorded
    // during the initial build as defaultCC.
    // defaultCC is defined in zdefaultcc.go, written by cmd/dist.
    //
    // The compiler command line is split into arguments on whitespace. Quotes
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Nov 02 16:43:23 GMT 2023
    - 97K bytes
    - Viewed (0)
  6. src/bytes/reader.go

    	m, err := w.Write(b)
    	if m > len(b) {
    		panic("bytes.Reader.WriteTo: invalid Write count")
    	}
    	r.i += int64(m)
    	n = int64(m)
    	if m != len(b) && err == nil {
    		err = io.ErrShortWrite
    	}
    	return
    }
    
    // Reset resets the [Reader.Reader] to be reading from b.
    func (r *Reader) Reset(b []byte) { *r = Reader{b, 0, -1} }
    
    // NewReader returns a new [Reader.Reader] reading from b.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  7. src/bytes/reader_test.go

    	}
    }
    
    var UnreadRuneErrorTests = []struct {
    	name string
    	f    func(*Reader)
    }{
    	{"Read", func(r *Reader) { r.Read([]byte{0}) }},
    	{"ReadByte", func(r *Reader) { r.ReadByte() }},
    	{"UnreadRune", func(r *Reader) { r.UnreadRune() }},
    	{"Seek", func(r *Reader) { r.Seek(0, io.SeekCurrent) }},
    	{"WriteTo", func(r *Reader) { r.WriteTo(&Buffer{}) }},
    }
    
    func TestUnreadRuneError(t *testing.T) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Dec 13 18:45:54 GMT 2021
    - 8K bytes
    - Viewed (0)
  8. src/cmd/asm/internal/flags/flags.go

    	OutputFile = flag.String("o", "", "output file; default foo.o for /a/b/c/foo.s as first argument")
    	TrimPath   = flag.String("trimpath", "", "remove prefix from recorded source file paths")
    	Shared     = flag.Bool("shared", false, "generate code that can be linked into a shared library")
    	Dynlink    = flag.Bool("dynlink", false, "support references to Go symbols defined in other shared libraries")
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Tue Aug 22 19:18:23 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/archive/tar/writer.go

    			paxHdrs[paxGNUSparseName] = realName
    			paxHdrs[paxGNUSparseRealSize] = strconv.FormatInt(realSize, 10)
    			paxHdrs[paxSize] = strconv.FormatInt(hdr.Size, 10)
    			delete(paxHdrs, paxPath) // Recorded by paxGNUSparseName
    		}
    	*/
    	_ = realSize
    
    	// Write PAX records to the output.
    	isGlobal := hdr.Typeflag == TypeXGlobalHeader
    	if len(paxHdrs) > 0 || isGlobal {
    		// Sort keys for deterministic ordering.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 19.6K bytes
    - Viewed (0)
  10. src/bytes/bytes.go

    			if start < 0 {
    				start = i
    			}
    		}
    		i += size
    	}
    
    	// Last field might end at EOF.
    	if start >= 0 {
    		spans = append(spans, span{start, len(s)})
    	}
    
    	// Create subslices from recorded field indices.
    	a := make([][]byte, len(spans))
    	for i, span := range spans {
    		a[i] = s[span.start:span.end:span.end]
    	}
    
    	return a
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
Back to top