Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 60 for Header (0.17 sec)

  1. src/archive/tar/reader_test.go

    			for i, hdr := range hdrs {
    				if i >= len(v.headers) {
    					t.Fatalf("entry %d: unexpected header:\ngot %+v", i, *hdr)
    				}
    				if !reflect.DeepEqual(*hdr, *v.headers[i]) {
    					t.Fatalf("entry %d: incorrect header:\ngot  %+v\nwant %+v", i, *hdr, *v.headers[i])
    				}
    			}
    			if len(hdrs) != len(v.headers) {
    				t.Fatalf("got %d headers, want %d headers", len(hdrs), len(v.headers))
    			}
    
    			for i, sum := range chksums {
    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)
  2. src/archive/zip/fuzz_test.go

    		if err != nil {
    			return
    		}
    
    		type file struct {
    			header  *FileHeader
    			content []byte
    		}
    		files := []file{}
    
    		for _, f := range r.File {
    			fr, err := f.Open()
    			if err != nil {
    				continue
    			}
    			content, err := io.ReadAll(fr)
    			if err != nil {
    				continue
    			}
    			files = append(files, file{header: &f.FileHeader, content: content})
    			if _, err := r.Open(f.Name); err != nil {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 1.7K bytes
    - Viewed (0)
  3. src/archive/tar/common.go

    // For forward compatibility, users that retrieve a Header from Reader.Next,
    // mutate it in some ways, and then pass it back to Writer.WriteHeader
    // should do so by creating a new Header and copying the fields
    // that they are interested in preserving.
    type Header struct {
    	// Typeflag is the type of header entry.
    	// The zero value is automatically promoted to either TypeReg or TypeDir
    	// depending on the presence of a trailing slash in Name.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 15 16:01:50 GMT 2024
    - 24.7K bytes
    - Viewed (2)
  4. src/archive/tar/fuzz_test.go

    		r := NewReader(bytes.NewReader(b))
    		type file struct {
    			header  *Header
    			content []byte
    		}
    		files := []file{}
    		for {
    			hdr, err := r.Next()
    			if err == io.EOF {
    				break
    			}
    			if err != nil {
    				return
    			}
    			buf := bytes.NewBuffer(nil)
    			if _, err := io.Copy(buf, r); err != nil {
    				continue
    			}
    			files = append(files, file{header: hdr, content: buf.Bytes()})
    		}
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Jan 13 18:06:33 GMT 2022
    - 2.2K bytes
    - Viewed (0)
  5. src/archive/zip/reader_test.go

    	return messWith("crc32-not-streamed.zip", func(b []byte) {
    		// Corrupt foo.txt's final crc32 byte, in both
    		// the file header and TOC. (0x7e -> 0x7f)
    		b[0x11]++
    		b[0x9d]++
    
    		// TODO(bradfitz): add a new test that only corrupts
    		// one of these values, and verify that that's also an
    		// error. Currently, the reader code doesn't verify the
    		// fileheader and TOC's crc32 match if they're both
    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)
  6. src/archive/tar/writer.go

    // The Header.Size determines how many bytes can be written for the next file.
    // If the current file is not fully written, then this returns an error.
    // This implicitly flushes any padding necessary before writing the header.
    func (tw *Writer) WriteHeader(hdr *Header) error {
    	if err := tw.Flush(); err != nil {
    		return err
    	}
    	tw.hdr = *hdr // Shallow copy of Header
    
    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)
  7. src/arena/arena.go

    //go:linkname runtime_arena_newArena
    func runtime_arena_newArena() unsafe.Pointer
    
    //go:linkname runtime_arena_arena_New
    func runtime_arena_arena_New(arena unsafe.Pointer, typ any) any
    
    // Mark as noescape to avoid escaping the slice header.
    //
    //go:noescape
    //go:linkname runtime_arena_arena_Slice
    func runtime_arena_arena_Slice(arena unsafe.Pointer, slice any, cap int)
    
    //go:linkname runtime_arena_arena_Free
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Oct 12 20:23:36 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  8. doc/next/6-stdlib/99-minor/archive/tar/50102.md

    If the argument to [FileInfoHeader] implements the new [FileInfoNames]
    interface, then the interface methods will be used to set the Uname/Gname
    of the file header. This allows applications to override the system-dependent
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 243 bytes
    - Viewed (0)
  9. src/cmd/cgo/doc.go

    The Go code can then refer to types such as C.size_t, variables such
    as C.stdout, or functions such as C.putchar.
    
    If the import of "C" is immediately preceded by a comment, that
    comment, called the preamble, is used as a header when compiling
    the C parts of the package. For example:
    
    	// #include <stdio.h>
    	// #include <errno.h>
    	import "C"
    
    The preamble may contain any C code, including function and variable
    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)
  10. src/archive/zip/writer_test.go

    		}
    	}
    }
    
    func testCreate(t *testing.T, w *Writer, wt *WriteTest) {
    	header := &FileHeader{
    		Name:   wt.Name,
    		Method: wt.Method,
    	}
    	if wt.Mode != 0 {
    		header.SetMode(wt.Mode)
    	}
    	f, err := w.CreateHeader(header)
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = f.Write(wt.Data)
    	if err != nil {
    		t.Fatal(err)
    	}
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 15 19:04:06 GMT 2023
    - 14.1K bytes
    - Viewed (0)
Back to top