- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 178 for rawbuffer (0.13 sec)
-
src/net/http/transfer_test.go
tests := []struct { r io.Reader want bool }{ {pr, false}, {bytes.NewReader(nil), true}, {bytes.NewBuffer(nil), true}, {strings.NewReader(""), true}, {io.NopCloser(pr), false}, {io.NopCloser(bytes.NewReader(nil)), true}, {io.NopCloser(bytes.NewBuffer(nil)), true}, {io.NopCloser(strings.NewReader("")), true}, } for i, tt := range tests { got := isKnownInMemoryReader(tt.r)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:16:28 UTC 2023 - 9.1K bytes - Viewed (0) -
src/cmd/internal/obj/riscv/asm_test.go
dir, err := os.MkdirTemp("", "testlargebranch") if err != nil { t.Fatalf("Could not create directory: %v", err) } defer os.RemoveAll(dir) // Generate a very large function. buf := bytes.NewBuffer(make([]byte, 0, 7000000)) genLargeBranch(buf) tmpfile := filepath.Join(dir, "x.s") if err := os.WriteFile(tmpfile, buf.Bytes(), 0644); err != nil { t.Fatalf("Failed to write file: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 22 01:50:18 UTC 2023 - 7.9K bytes - Viewed (0) -
src/cmd/go/internal/test/genflags.go
return err } t := template.Must(template.New("fileTemplate").Parse(fileTemplate)) tData := map[string][]string{ "testFlags": genflags.ShortTestFlags(), "vetAnalyzers": vetAnalyzers, } buf := bytes.NewBuffer(nil) if err := t.Execute(buf, tData); err != nil { return err } f, err := os.Create("flagdefs.go") if err != nil { return err } cmd := exec.Command("gofmt") cmd.Stdin = buf
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 09 13:37:58 UTC 2023 - 1.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugins.go
if config == nil || reflect.ValueOf(config).IsNil() { return nil, nil, nil } configBytes, err := io.ReadAll(config) if err != nil { return nil, nil, err } return bytes.NewBuffer(configBytes), bytes.NewBuffer(configBytes), nil } // NewFromPlugins returns an admission.Interface that will enforce admission control decisions of all // the given plugins.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Jun 29 15:48:39 UTC 2023 - 6K bytes - Viewed (0) -
operator/pkg/util/progress/progress_test.go
// limitations under the License. package progress import ( "bytes" "io" "testing" "istio.io/istio/operator/pkg/name" ) func TestProgressLog(t *testing.T) { buf := bytes.NewBuffer(nil) testBuf := io.Writer(buf) testWriter = &testBuf expected := "" expect := func(e string) { t.Helper() // In buffer mode we don't overwrite old data, so we are constantly appending to the expected
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 14 19:23:44 UTC 2024 - 2.1K bytes - Viewed (0) -
src/math/bits/make_tables.go
// license that can be found in the LICENSE file. // Code generated by go run make_tables.go. DO NOT EDIT. package bits `) func main() { buf := bytes.NewBuffer(header) gen(buf, "ntz8tab", ntz8) gen(buf, "pop8tab", pop8) gen(buf, "rev8tab", rev8) gen(buf, "len8tab", len8) out, err := format.Source(buf.Bytes()) if err != nil { log.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 1.5K bytes - Viewed (0) -
src/runtime/pprof/protomem_test.go
}() for _, sz := range []int{128, 256} { genericAllocFunc[uint32](sz / 4) } for _, sz := range []int{32, 64} { genericAllocFunc[uint64](sz / 8) } runtime.GC() buf := bytes.NewBuffer(nil) if err := WriteHeapProfile(buf); err != nil { t.Fatalf("writing profile: %v", err) } p, err := profile.Parse(buf) if err != nil { t.Fatalf("profile.Parse: %v", err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 21 14:38:45 UTC 2024 - 6.7K bytes - Viewed (0) -
pkg/wasm/httpfetcher.go
func isPosixTar(b []byte) bool { return len(b) > 262 && bytes.Equal(b[257:262], tarMagicNumber) } // wasm plugin should be the only file in the tarball. func getFirstFileFromTar(b []byte) []byte { buf := bytes.NewBuffer(b) // Limit wasm module to 256mb; in reality it must be much smaller tr := tar.NewReader(io.LimitReader(buf, 1024*1024*256)) h, err := tr.Next() if err != nil { return nil }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Nov 14 20:23:34 UTC 2022 - 5.5K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go
t.Errorf("expecting error %q, got %v", tc.expectedError, err) } return } if err != nil { t.Fatalf("unexpected error: %v", err) } out := bytes.NewBuffer([]byte{}) err = p.PrintObj(testObject, out) if len(tc.expectedParseError) > 0 { if err == nil || !strings.Contains(err.Error(), tc.expectedParseError) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 09:47:52 UTC 2023 - 6.7K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/json_yaml_flags_test.go
if IsNoCompatiblePrinterError(err) { t.Fatalf("expected to match template printer for output format %q", tc.outputFormat) } if err != nil { t.Fatalf("unexpected error: %v", err) } out := bytes.NewBuffer([]byte{}) err = p.PrintObj(testObject, out) if err != nil { t.Errorf("unexpected error: %v", err) } if !strings.Contains(out.String(), tc.expectedOutput) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 21 15:08:30 UTC 2018 - 2.4K bytes - Viewed (0)