- Sort Score
- Result 10 results
- Languages All
Results 891 - 900 of 1,123 for Nil (0.02 sec)
-
internal/crypto/header_test.go
} func TestKMSParseHTTP(t *testing.T) { for i, test := range kmsParseHTTPTests { _, _, err := S3KMS.ParseHTTP(test.Header) if err == nil && test.ShouldFail { t.Errorf("Test %d: should fail but succeeded", i) } if err != nil && !test.ShouldFail { t.Errorf("Test %d: should pass but failed with: %v", i, err) } } } var s3IsRequestedTests = []struct { Header http.Header
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 13 14:52:15 UTC 2022 - 21.4K bytes - Viewed (0) -
cmd/metacache-marker.go
o.ID = mustGetUUID() o.Create = true case "p": // pool v, err := strconv.ParseInt(kv[1], 10, 64) if err != nil { o.ID = mustGetUUID() o.Create = true continue } o.pool = int(v) case "s": // set v, err := strconv.ParseInt(kv[1], 10, 64) if err != nil { o.ID = mustGetUUID() o.Create = true continue } o.set = int(v) default: // Ignore unknown
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 2.5K bytes - Viewed (0) -
internal/disk/stat_linux_32bit.go
} // GetInfo returns total and free bytes available in a directory, e.g. `/`. func GetInfo(path string, _ bool) (info Info, err error) { s := syscall.Statfs_t{} err = syscall.Statfs(path, &s) if err != nil { return Info{}, err } reservedBlocks := s.Bfree - s.Bavail info = Info{ Total: uint64(s.Frsize) * (s.Blocks - reservedBlocks), Free: uint64(s.Frsize) * s.Bavail, Files: s.Files, Ffree: s.Ffree,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 26 19:34:50 UTC 2024 - 2.6K bytes - Viewed (0) -
cmd/metrics-v3-system-memory.go
) // loadMemoryMetrics - `MetricsLoaderFn` for node memory metrics. func loadMemoryMetrics(ctx context.Context, m MetricValues, c *metricsCache) error { memMetrics, err := c.memoryMetrics.Get() if err != nil { metricsLogIf(ctx, err) return err } m.Set(memTotal, float64(memMetrics.Total)) m.Set(memUsed, float64(memMetrics.Used)) usedPerc := float64(memMetrics.Used) * 100 / float64(memMetrics.Total)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Apr 17 05:10:25 UTC 2024 - 2.2K bytes - Viewed (0) -
internal/http/request-recorder.go
// Close is a no operation closer func (r *RequestRecorder) Close() error { // no-op return nil } // Read reads from the internal reader and counts/save the body in the memory func (r *RequestRecorder) Read(p []byte) (n int, err error) { n, err = r.Reader.Read(p) r.bytesRead += n if r.LogBody { r.buf.Write(p[:n]) } if err != nil { return n, err } return n, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Apr 12 21:37:19 UTC 2023 - 1.8K bytes - Viewed (0) -
cmd/api-response.go
if s == nil { return nil } if len(s.Items) == 0 { return nil } if err := e.EncodeToken(start); err != nil { return err } for _, item := range s.Items { if err := e.Encode(xmlKeyEntry{ XMLName: xxml.Name{Local: item.Key}, Value: item.Value, }); err != nil { return err } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Oct 31 19:27:06 UTC 2024 - 33.4K bytes - Viewed (0) -
cmd/erasure-sets_test.go
t.Fatalf("Expecting error, got %s", err) } _, _, err = waitForFormatErasure(true, nil, 1, 1, 16, "") if err != errInvalidArgument { t.Fatalf("Expecting error, got %s", err) } // Initializes all erasure disks storageDisks, format, err := waitForFormatErasure(true, endpoints, 1, 1, 16, "") if err != nil { t.Fatalf("Unable to format drives for erasure, %s", err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 12 07:21:56 UTC 2024 - 6.9K bytes - Viewed (0) -
internal/crypto/header.go
if err != nil || len(clientKey) != 32 { // The client key must be 256 bits long return key, ErrInvalidCustomerKey } keyMD5, err := base64.StdEncoding.DecodeString(h.Get(xhttp.AmzServerSideEncryptionCopyCustomerKeyMD5)) if md5Sum := md5.Sum(clientKey); err != nil || !bytes.Equal(md5Sum[:], keyMD5) { return key, ErrCustomerKeyMD5Mismatch }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Feb 22 06:26:06 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/auditlog/auditlog-echo.go
var port int func init() { flag.IntVar(&port, "port", 8080, "Port to listen on") } func mainHandler(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(r.Body) defer r.Body.Close() if err != nil { log.Printf("Error reading request body: %v", err) w.WriteHeader(http.StatusBadRequest) return } log.Printf(">>> %s %s\n", r.Method, r.URL.Path) var out bytes.Buffer json.Indent(&out, body, "", " ")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 1.5K bytes - Viewed (0) -
internal/config/compress/compress_test.go
testCase := testCase t.Run(testCase.str, func(t *testing.T) { gotPatterns, err := parseCompressIncludes(testCase.str) if !testCase.success && err == nil { t.Error("expected failure but success instead") } if testCase.success && err != nil { t.Errorf("expected success but failed instead %s", err) } if testCase.success && !reflect.DeepEqual(testCase.expectedPatterns, gotPatterns) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jun 01 21:59:40 UTC 2021 - 1.8K bytes - Viewed (0)