- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 78 for ReadFile (0.08 sec)
-
src/archive/zip/fuzz_test.go
testdata, err := os.ReadDir("testdata") if err != nil { f.Fatalf("failed to read testdata directory: %s", err) } for _, de := range testdata { if de.IsDir() { continue } b, err := os.ReadFile(filepath.Join("testdata", de.Name())) if err != nil { f.Fatalf("failed to read testdata: %s", err) } f.Add(b) } f.Fuzz(func(t *testing.T, b []byte) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Jan 13 18:06:33 UTC 2022 - 1.7K bytes - Viewed (0) -
istioctl/pkg/proxyconfig/proxyconfig_test.go
expectedString string // String output is expected to contain wantException bool } func TestProxyConfig(t *testing.T) { loggingConfig := map[string][]byte{ "details-v1-5b7f94f9bc-wp5tb": util.ReadFile(t, "../writer/envoy/logging/testdata/logging.txt"), "httpbin-794b576b6c-qx6pf": []byte("{}"), } cases := []execTestCase{ { args: []string{},
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Apr 10 21:51:29 UTC 2024 - 8.9K bytes - Viewed (0) -
lib/time/mkzip.go
var zb bytes.Buffer zw := zip.NewWriter(&zb) seen := make(map[string]bool) err := filepath.WalkDir(".", func(path string, d fs.DirEntry, err error) error { if d.IsDir() { return nil } data, err := os.ReadFile(path) if err != nil { log.Fatal(err) } if strings.HasSuffix(path, ".zip") { log.Fatalf("unexpected file during walk: %s", path) } name := filepath.ToSlash(path)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Mar 04 17:32:07 UTC 2024 - 2.1K bytes - Viewed (0) -
cmd/sftp-server_test.go
suite.SFTPFailedPublicKeyAuthenticationInvalidKey(c) suite.TearDownSuite(c) }, ) } } func (s *TestSuiteIAM) SFTPFailedPublicKeyAuthenticationInvalidKey(c *check) { keyBytes, err := os.ReadFile("./testdata/invalid_test_key.pub") if err != nil { c.Fatalf("could not read test key file: %s", err) } testKey, _, _, _, err := ssh.ParseAuthorizedKey(keyBytes) if err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 28 09:06:25 UTC 2024 - 8.3K bytes - Viewed (0) -
internal/s3select/json/preader_test.go
} } func BenchmarkPReader(b *testing.B) { files, err := os.ReadDir("testdata") if err != nil { b.Fatal(err) } for _, file := range files { b.Run(file.Name(), func(b *testing.B) { f, err := os.ReadFile(filepath.Join("testdata", file.Name())) if err != nil { b.Fatal(err) } b.SetBytes(int64(len(f))) b.ReportAllocs() b.ResetTimer() var record sql.Record for i := 0; i < b.N; i++ {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 2.5K bytes - Viewed (0) -
internal/s3select/json/reader_test.go
} } func BenchmarkReader(b *testing.B) { files, err := os.ReadDir("testdata") if err != nil { b.Fatal(err) } for _, file := range files { b.Run(file.Name(), func(b *testing.B) { f, err := os.ReadFile(filepath.Join("testdata", file.Name())) if err != nil { b.Fatal(err) } b.SetBytes(int64(len(f))) b.ReportAllocs() b.ResetTimer() var record sql.Record for i := 0; i < b.N; i++ {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 2.5K bytes - Viewed (0) -
src/archive/zip/writer_test.go
t.Fatalf("unexpected CreateHeader error: %v", err) } if err := w.Close(); err != nil { t.Fatalf("unexpected Close error: %v", err) } want, err := os.ReadFile("testdata/time-go.zip") if err != nil { t.Fatalf("unexpected ReadFile error: %v", err) } if got := buf.Bytes(); !bytes.Equal(got, want) { fmt.Printf("%x\n%x\n", got, want) t.Error("contents of time-go.zip differ") } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 14.4K bytes - Viewed (0) -
docs/debugging/hash-set/main.go
} if setCount == 0 { log.Fatalln("set count cannot be zero") } id := uuid.MustParse(deploymentID) if file != "" { distrib := make([][]string, setCount) b, err := os.ReadFile(file) if err != nil { log.Fatalln(err) } b = bytes.ReplaceAll(b, []byte("\r"), []byte{}) sc := bufio.NewScanner(bytes.NewBuffer(b)) for sc.Scan() { object = strings.TrimSpace(sc.Text())
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 3.7K bytes - Viewed (0) -
cni/pkg/install/install_test.go
} // check if conf file is deleted/conflist file is updated if c.chainedCNIPlugin { resultConfig := testutils.ReadFile(t, cniConfigFilePath) goldenFilepath := filepath.Join("testdata", c.expectedConfigFilename) goldenConfig := testutils.ReadFile(t, goldenFilepath) testutils.CompareBytes(t, resultConfig, goldenConfig, goldenFilepath) } else if file.Exists(cniConfigFilePath) {
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri Jan 26 20:34:28 UTC 2024 - 11.1K bytes - Viewed (0) -
istioctl/pkg/writer/envoy/configdump/route_test.go
{ name: "k8s-gateway-http-route-path-prefix", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { gotOut := &bytes.Buffer{} cw := &ConfigWriter{Stdout: gotOut} cd, _ := os.ReadFile(fmt.Sprintf("testdata/routes/%s/configdump.json", tt.name)) if err := cw.Prime(cd); err != nil { t.Errorf("failed to parse config dump: %s", err) } err := cw.PrintRouteSummary(RouteFilter{Verbose: true})
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Nov 29 12:37:14 UTC 2023 - 2.8K bytes - Viewed (0)