- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for fitsInOctal (0.04 sec)
-
src/archive/tar/strconv.go
func (f *formatter) formatOctal(b []byte, x int64) { if !fitsInOctal(len(b), x) { x = 0 // Last resort, just write zero f.err = ErrFieldTooLong } s := strconv.FormatInt(x, 8) // Add leading zeros, but leave room for a NUL. if n := len(b) - len(s) - 1; n > 0 { s = strings.Repeat("0", n) + s } f.formatString(b, s) } // fitsInOctal reports whether the integer x fits in a field n-bytes long
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Sep 08 17:08:20 UTC 2025 - 9.1K bytes - Viewed (0) -
src/archive/tar/strconv_test.go
{012345670123, 12, true}, {01564164, 12, true}, {-012345670123, 12, false}, {-01564164, 12, false}, {-1564164, 30, false}, } for _, v := range vectors { ok := fitsInOctal(v.width, v.input) if ok != v.ok { t.Errorf("checkOctal(%d, %d): got %v, want %v", v.input, v.width, ok, v.ok) } } } func TestParsePAXTime(t *testing.T) { vectors := []struct {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Sep 08 17:08:20 UTC 2025 - 15K bytes - Viewed (0) -
src/archive/tar/common.go
} } verifyNumeric := func(n int64, size int, name, paxKey string) { if !fitsInBase256(size, n) { whyNoGNU = fmt.Sprintf("GNU cannot encode %s=%d", name, n) format.mustNotBe(FormatGNU) } if !fitsInOctal(size, n) { whyNoUSTAR = fmt.Sprintf("USTAR cannot encode %s=%d", name, n) format.mustNotBe(FormatUSTAR) if paxKey == paxNone { whyNoPAX = fmt.Sprintf("PAX cannot encode %s=%d", name, n)
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Fri Sep 13 21:03:27 UTC 2024 - 24.5K bytes - Viewed (0)