- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 125 for zeros (0.18 sec)
-
src/archive/tar/reader.go
if _, err := io.ReadFull(tr.r, tr.blk[:]); err != nil { return nil, nil, err // EOF is okay here; exactly 1 block of zeros read } if bytes.Equal(tr.blk[:], zeroBlock[:]) { return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read } return nil, nil, ErrHeader // Zero block and then non-zero block } // Verify the header matches a known format. format := tr.blk.getFormat()
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Mar 08 01:59:14 GMT 2024 - 26.8K bytes - Viewed (0) -
src/archive/zip/zip_test.go
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Wed Mar 27 18:23:49 GMT 2024 - 19.5K bytes - Viewed (0) -
src/archive/tar/format.go
c = ' ' // Treat the checksum field itself as all spaces. } unsigned += int64(c) signed += int64(int8(c)) } return unsigned, signed } // reset clears the block with all zeros. func (b *block) reset() { *b = block{} } type headerV7 [blockSize]byte func (h *headerV7) name() []byte { return h[000:][:100] } func (h *headerV7) mode() []byte { return h[100:][:8] }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Fri Oct 13 18:36:46 GMT 2023 - 11.3K bytes - Viewed (0) -
src/archive/zip/reader_test.go
// // import ( // "archive/zip" // "bytes" // "io" // "log" // "os" // ) // // type zeros struct{} // // func (zeros) Read(b []byte) (int, error) { // clear(b) // return len(b), nil // } // // func main() { // bigZip := makeZip("big.file", io.LimitReader(zeros{}, 1<<32-1)) // if err := os.WriteFile("/tmp/big.zip", bigZip, 0666); err != nil { // log.Fatal(err) // } //
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) -
src/archive/tar/strconv.go
} return int64(x) } 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) }
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Tue Aug 01 14:28:42 GMT 2023 - 9K bytes - Viewed (0) -
misc/cgo/gmp/gmp.go
introduce a Go variable that points at the C variable (the linker can be told to initialize this pointer). For example, if the gmp library provided mpz_t zero; then cgo would rewrite a reference to C.zero by introducing var _C_zero *C.mpz_t and then replacing all instances of C.zero with (*_C_zero). Cgo's most interesting translation is for functions. If xxx is a C function, then cgo rewrites C.xxx into a new function _C_xxx that
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 9.5K bytes - Viewed (0) -
association.go
if _, zero := rel.Field.ValueOf(association.DB.Statement.Context, data); !zero { fieldValue := reflect.Indirect(rel.Field.ReflectValueOf(association.DB.Statement.Context, data)) primaryValues := make([]interface{}, len(rel.FieldSchema.PrimaryFields)) switch fieldValue.Kind() { case reflect.Slice, reflect.Array: validFieldValues := reflect.Zero(rel.Field.IndirectFieldType)
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Thu May 04 11:30:45 GMT 2023 - 21.2K bytes - Viewed (0) -
schema/field.go
v = v.Elem() } else { return nil, true } } } fv, zero := v.Interface(), v.IsZero() return fv, zero } } if field.Serializer != nil { oldValuerOf := field.ValueOf field.ValueOf = func(ctx context.Context, v reflect.Value) (interface{}, bool) { value, zero := oldValuerOf(ctx, v) s, ok := value.(SerializerValuerInterface) if !ok {
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Mon Apr 15 03:20:20 GMT 2024 - 32K bytes - Viewed (1) -
src/cmd/asm/internal/lex/slice.go
line int pos int } func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice { return &Slice{ tokens: tokens, base: base, line: line, pos: -1, // Next will advance to zero. } } func (s *Slice) Next() ScanToken { s.pos++ if s.pos >= len(s.tokens) { return scanner.EOF } return s.tokens[s.pos].ScanToken } func (s *Slice) Text() string {
Go - Registered: Tue Apr 23 11:13:09 GMT 2024 - Last Modified: Thu Jun 29 22:49:50 GMT 2023 - 1.6K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/route_test.go
"istio.io/istio/pkg/test/util/assert" ) func TestDescribeRouteDomains(t *testing.T) { tests := []struct { desc string domains []string expected string }{ { desc: "test zero domain", domains: []string{}, expected: "", }, { desc: "test only one domain", domains: []string{"example.com"}, expected: "example.com", }, {
Go - Registered: Wed Apr 24 22:53:08 GMT 2024 - Last Modified: Wed Nov 29 12:37:14 GMT 2023 - 2.8K bytes - Viewed (0)