- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 36 for wrap (0.16 sec)
-
internal/etag/reader.go
// // the ETag computed over the content. // reader := etag.Wrap(encryptedContent, content) func Wrap(wrapped, content io.Reader) io.Reader { if t, ok := content.(Tagger); ok { return wrapReader{ Reader: wrapped, Tagger: t, } } return wrapReader{ Reader: wrapped, } } // A Reader wraps an io.Reader and computes the // MD5 checksum of the read content as ETag. //
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 4.8K bytes - Viewed (0) -
internal/s3select/simdj/reader.go
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue May 30 17:02:22 GMT 2023 - 4.9K bytes - Viewed (0) -
internal/rest/client_test.go
want: true, }, { name: "net.Error-unmatched", err: errors.New("something"), want: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { // Wrap error n := &NetworkError{ Err: tt.err, } //nolint:gocritic if tt.target == nil { var netErrInterface net.Error if errors.As(n, &netErrInterface) != tt.want {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Nov 16 17:28:29 GMT 2021 - 1.9K bytes - Viewed (0) -
internal/ioutil/read_file.go
// as an error to be reported. // // passes NOATIME flag for reads on Unix systems to avoid atime updates. func ReadFile(name string) ([]byte, error) { // Don't wrap with un-needed buffer. // Don't use os.ReadFile, since it doesn't pass NO_ATIME when present. f, err := OsOpenFile(name, readMode, 0o666) if err != nil { return nil, err } defer f.Close() st, err := f.Stat()
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sat Dec 09 18:17:51 GMT 2023 - 2.3K bytes - Viewed (0) -
internal/s3select/json/reader.go
d := jstream.NewDecoder(readCloser, 0).ObjectAsKVS() return &Reader{ args: args, decoder: d, valueCh: d.Stream(), readCloser: readCloser, } } // syncReadCloser will wrap a readcloser and make it safe to call Close while // reads are running. type syncReadCloser struct { rc io.ReadCloser mu sync.Mutex } func (pr *syncReadCloser) Read(p []byte) (n int, err error) {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Mar 24 03:58:53 GMT 2022 - 3K bytes - Viewed (0) -
tests/connpool_test.go
// // func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) { // return c.db.BeginTx(ctx, opts) // } // // You should use BeginTx returned gorm.Tx which could wrap *sql.Tx then you can record all queries. func (c *wrapperConnPool) BeginTx(ctx context.Context, opts *sql.TxOptions) (gorm.ConnPool, error) { tx, err := c.db.BeginTx(ctx, opts) if err != nil { return nil, err }
Go - Registered: Sun Apr 28 09:35:09 GMT 2024 - Last Modified: Tue Feb 06 02:54:40 GMT 2024 - 5.5K bytes - Viewed (0) -
misc/cgo/gmp/gmp.go
*/ package gmp /* #cgo LDFLAGS: -lgmp #include <gmp.h> #include <stdlib.h> // gmp 5.0.0+ changed the type of the 3rd argument to mp_bitcnt_t, // so, to support older versions, we wrap these two functions. void _mpz_mul_2exp(mpz_ptr a, mpz_ptr b, unsigned long n) { mpz_mul_2exp(a, b, n); } void _mpz_div_2exp(mpz_ptr a, mpz_ptr b, unsigned long n) { mpz_div_2exp(a, b, n); } */ import "C"
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Mon Apr 11 16:34:30 GMT 2022 - 9.5K bytes - Viewed (0) -
src/bufio/bufio_test.go
b := NewReaderSize(strings.NewReader("hello world"), BufSize) // Does it recognize itself? b1 := NewReaderSize(b, BufSize) if b1 != b { t.Error("NewReaderSize did not detect underlying Reader") } // Does it wrap if existing buffer is too small? b2 := NewReaderSize(b, 2*BufSize) if b2 == b { t.Error("NewReaderSize did not enlarge buffer") } } func TestNewWriterSizeIdempotent(t *testing.T) {
Go - Registered: Tue Apr 30 11:13:12 GMT 2024 - Last Modified: Fri Feb 10 18:56:01 GMT 2023 - 51.5K bytes - Viewed (0) -
internal/etag/etag_test.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package etag import ( "context" "io" "net/http" "strings" "testing" ) var _ Tagger = Wrap(nil, nil).(Tagger) // runtime check that wrapReader implements Tagger var parseTests = []struct { String string ETag ETag ShouldFail bool }{
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Sep 18 17:00:54 GMT 2023 - 12.6K bytes - Viewed (0) -
cmd/metrics-v3-types.go
// and the Metrics API handler returns a 500 HTTP status code. This should // normally not happen, and usually indicates a bug. logger.CriticalIf(GlobalContext, errors.Wrap(err, "failed to get metrics")) promMetrics := metricValues.ToPromMetrics(mg.CollectorPath.metricPrefix(), mg.ExtraLabels) for _, metric := range promMetrics { ch <- metric } }
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Sun Mar 10 09:15:15 GMT 2024 - 14.6K bytes - Viewed (0)