- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 127 for readAll (0.1 sec)
-
docs/auditlog/auditlog-echo.go
"io" "log" "net/http" ) 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)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 01 21:31:13 UTC 2024 - 1.5K bytes - Viewed (0) -
src/archive/zip/fuzz_test.go
type file struct { header *FileHeader content []byte } files := []file{} for _, f := range r.File { fr, err := f.Open() if err != nil { continue } content, err := io.ReadAll(fr) if err != nil { continue } files = append(files, file{header: &f.FileHeader, content: content}) if _, err := r.Open(f.Name); err != nil { continue } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 1.7K bytes - Viewed (0) -
internal/config/policy/opa/config.go
} resp, err := o.client.Do(req) if err != nil { return false, err } defer o.args.CloseRespFn(resp.Body) // Read the body to be saved later. opaRespBytes, err := io.ReadAll(resp.Body) if err != nil { return false, err } // Handle large OPA responses when OPA URL is of // form http://localhost:8181/v1/data/httpapi/authz type opaResultAllow struct { Result struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 10 20:16:44 UTC 2024 - 5.3K bytes - Viewed (0) -
cni/pkg/plugin/cnieventclient.go
if err != nil { return fmt.Errorf("failed to send event request: %v", err) } defer response.Body.Close() if response.StatusCode != http.StatusOK { body, err := io.ReadAll(io.LimitReader(response.Body, 1024*1024)) if err != nil { return fmt.Errorf("unable to push CNI event and failed to read body (status code %d): %v", response.StatusCode, err) }
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Tue Jul 02 18:48:50 UTC 2024 - 2.7K bytes - Viewed (0) -
cmd/config-common.go
if err != nil { if isErrObjectNotFound(err) { return nil, ObjectInfo{}, errConfigNotFound } return nil, ObjectInfo{}, err } defer r.Close() buf, err := io.ReadAll(r) if err != nil { return nil, ObjectInfo{}, err } if len(buf) == 0 { return nil, ObjectInfo{}, errConfigNotFound } return buf, r.ObjInfo, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 3.1K bytes - Viewed (0) -
internal/s3select/sql/jsonpath_test.go
return nil, err } return result, nil } func TestJsonpathEval(t *testing.T) { f, err := os.Open(filepath.Join("jsondata", "books.json")) if err != nil { t.Fatal(err) } b, err := io.ReadAll(f) if err != nil { t.Fatal(err) } p := participle.MustBuild( &JSONPath{}, participle.Lexer(sqlLexer), participle.CaseInsensitive("Keyword"), ) cases := []struct { str string
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 23 19:35:41 UTC 2024 - 2.8K bytes - Viewed (0) -
cni/pkg/log/uds_test.go
_ = istiolog.Sync() // Restore os stdout. os.Stdout = stdout assert.NoError(t, istiolog.Configure(loggingOptions)) assert.NoError(t, w.Close()) out, err := io.ReadAll(r) assert.NoError(t, err) cases := []struct { level string msg string key *float64 }{ {"debug", "debug log", nil}, {"info", "info log", nil}, {"warn", "warn log", nil},
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Jun 12 16:26:28 UTC 2024 - 4.1K bytes - Viewed (0) -
internal/s3select/select_test.go
ContentLength: int64(len(w.response)), } res, err := minio.NewSelectResults(&resp, "testbucket") if err != nil { t.Error(err) return } got, err := io.ReadAll(res) if err != nil { t.Error(err) return } gotS := strings.TrimSpace(string(got)) if !reflect.DeepEqual(gotS, testCase.wantResult) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 23 07:19:11 UTC 2023 - 76.2K bytes - Viewed (0) -
cmd/metacache-stream.go
continue } res = append(res, meta) } return metaCacheEntriesSorted{o: res}, nil } // readAll will return all remaining objects on the dst channel and close it when done. // The context allows the operation to be canceled. func (r *metacacheReader) readAll(ctx context.Context, dst chan<- metaCacheEntry) error { r.checkInit() if r.err != nil { return r.err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Apr 04 12:04:40 UTC 2024 - 19.5K bytes - Viewed (0) -
cmd/storage-rest_test.go
expectErr bool }{ {"foo", "myobject", []byte("foo"), false}, // file not found error. {"foo", "yourobject", nil, true}, } for i, testCase := range testCases { result, err := storage.ReadAll(context.Background(), testCase.volumeName, testCase.objectName) expectErr := (err != nil) if expectErr != testCase.expectErr { t.Fatalf("case %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 22 07:04:48 UTC 2024 - 11.5K bytes - Viewed (0)