Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mergePAX (0.07 sec)

  1. src/archive/tar/reader.go

    	// Read the sparse map according to the appropriate format.
    	if is1x0 {
    		return readGNUSparseMap1x0(tr.curr)
    	}
    	return readGNUSparseMap0x1(hdr.PAXRecords)
    }
    
    // mergePAX merges paxHdrs into hdr for all relevant fields of Header.
    func mergePAX(hdr *Header, paxHdrs map[string]string) (err error) {
    	for k, v := range paxHdrs {
    		if v == "" {
    			continue // Keep the original USTAR value
    		}
    		var id64 int64
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Mar 08 01:59:14 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  2. src/archive/tar/reader_test.go

    			},
    		},
    		ok: true,
    	}}
    
    	for i, v := range vectors {
    		got := new(Header)
    		err := mergePAX(got, v.in)
    		if v.ok && !reflect.DeepEqual(*got, *v.want) {
    			t.Errorf("test %d, mergePAX(...):\ngot  %+v\nwant %+v", i, *got, *v.want)
    		}
    		if ok := err == nil; ok != v.ok {
    			t.Errorf("test %d, mergePAX(...): got %v, want %v", i, ok, v.ok)
    		}
    	}
    }
    
    func TestParsePAX(t *testing.T) {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Thu Oct 03 15:48:09 UTC 2024
    - 46.9K bytes
    - Viewed (0)
Back to top