- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 208 for newReader (0.07 sec)
-
internal/mountinfo/mountinfo_linux.go
if err != nil { return nil, err } defer file.Close() return parseMountFrom(file) } func parseMountFrom(file io.Reader) (mountInfos, error) { mounts := mountInfos{} scanner := bufio.NewReader(file) for { line, err := scanner.ReadString('\n') if err == io.EOF { break } fields := strings.Fields(line) if len(fields) != expectedNumFieldsPerLine { // ignore incorrect lines.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.7K bytes - Viewed (0) -
internal/bucket/lifecycle/lifecycle_test.go
dec := xml.NewDecoder(strings.NewReader(tc.xml)) if err := dec.Decode(&got); err != nil || got != tc.expected { if err != nil { t.Fatalf("%d: Failed to unmarshal xml %v", i+1, err) } t.Fatalf("%d: Expected %v but got %v", i+1, tc.expected, got) } } } func TestParseLifecycleConfigWithID(t *testing.T) { r := bytes.NewReader([]byte(`<LifecycleConfiguration> <Rule>
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 23 01:12:48 UTC 2024 - 55.1K bytes - Viewed (0) -
cmd/config-current.go
logger.Fatal(err, "Unable to generate root secret key using KMS") } accessKey, err := auth.GenerateAccessKey(20, bytes.NewReader(aKey)) if err != nil { logger.Fatal(err, "Unable to generate root access key") } secretKey, err := auth.GenerateSecretKey(32, bytes.NewReader(sKey)) if err != nil { logger.Fatal(err, "Unable to generate root secret key") }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 30.1K bytes - Viewed (0) -
internal/http/response-recorder.go
// Body - Return response body. func (lrw *ResponseRecorder) Body() []byte { if lrw.Header().Get("Content-Encoding") == "gzip" { if lrw.body.Len() > 1<<20 { return gzippedBody } r, err := gzip.NewReader(&lrw.body) if err != nil { return gzippedBody } defer r.Close() b, _ := io.ReadAll(io.LimitReader(r, 10<<20)) return b } // If there was an error response or body logging is enabled
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 17:13:00 UTC 2024 - 5.5K bytes - Viewed (0) -
cmd/main.go
fmt.Fprintln(banner, color.Blue("License:")+color.Bold(" GNU AGPLv3 - https://www.gnu.org/licenses/agpl-3.0.html")) fmt.Fprintln(banner, color.Blue("Copyright:")+color.Bold(" 2015-%s MinIO, Inc.", CopyrightYear)) return strings.NewReader(banner.String()) } func printMinIOVersion(c *cli.Context) { io.Copy(c.App.Writer, versionBanner(c)) } var debugNoExit = env.Get("_MINIO_DEBUG_NO_EXIT", "") != "" // Main main for minio server.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 30 22:59:48 UTC 2024 - 6.5K bytes - Viewed (0) -
cmd/bitrot-streaming.go
if len(b.data) == 0 && b.tillOffset != streamOffset { b.rc, err = b.disk.ReadFileStream(context.TODO(), b.volume, b.filePath, streamOffset, b.tillOffset-streamOffset) } else { b.rc = io.NewSectionReader(bytes.NewReader(b.data), streamOffset, b.tillOffset-streamOffset) } if err != nil { return 0, err } } if offset != b.currOffset { // Can never happen unless there are programmer bugs
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 21 12:20:54 UTC 2024 - 6K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
func TestCopyAligned(t *testing.T) { f, err := os.CreateTemp("", "") if err != nil { t.Errorf("Error creating tmp file: %v", err) } defer f.Close() defer os.Remove(f.Name()) r := strings.NewReader("hello world") bufp := ODirectPoolSmall.Get().(*[]byte) defer ODirectPoolSmall.Put(bufp) written, err := CopyAligned(f, io.LimitReader(r, 5), *bufp, r.Size(), f) if !errors.Is(err, io.ErrUnexpectedEOF) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 22 23:07:14 UTC 2024 - 5.5K bytes - Viewed (0) -
internal/config/lambda/target/webhook.go
return nil, err } data, err := json.Marshal(eventData) if err != nil { return nil, err } req, err := http.NewRequest(http.MethodPost, target.args.Endpoint.String(), bytes.NewReader(data)) if err != nil { return nil, err } // Verify if the authToken already contains // <Key> <Token> like format, if this is // already present we can blindly use the
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:39:49 UTC 2024 - 6.7K bytes - Viewed (0) -
cmd/admin-handlers-idp-config.go
} cfg, err := readServerConfig(ctx, objectAPI, nil) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } dynamic, err := cfg.ReadConfig(strings.NewReader(cfgData)) if err != nil { writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL) return } // IDP config is not dynamic. Sanity check. if dynamic {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 12.7K bytes - Viewed (0) -
internal/bucket/replication/replication_test.go
expectedValidationErr: nil, }, } for i, tc := range testCases { t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) { cfg, err := ParseConfig(bytes.NewReader([]byte(tc.inputConfig))) if err != nil && tc.expectedParsingErr != nil && err.Error() != tc.expectedParsingErr.Error() { t.Fatalf("%d: Expected '%v' during parsing but got '%v'", i+1, tc.expectedParsingErr, err) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Mar 28 17:44:56 UTC 2024 - 32.5K bytes - Viewed (0)