- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 82 for ReadFile (0.21 sec)
-
cmd/xl-storage_test.go
} } { buf := make([]byte, 5) // Test for negative offset. if _, err = xlStorage.ReadFile(context.Background(), volume, "myobject", -1, buf, v); err == nil { t.Fatalf("expected: error, got: <nil>") } } for l := 0; l < 2; l++ { // Following block validates all ReadFile test cases. for i, testCase := range testCases { var n int64 // Common read buffer.
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Thu Apr 11 17:45:28 GMT 2024 - 66.7K bytes - Viewed (0) -
istioctl/pkg/waypoint/waypoint_test.go
t.Fatal(err) } for _, gw := range tt.gateways { _, _ = client.GatewayAPI().GatewayV1().Gateways(gw.Namespace).Create(context.Background(), gw, metav1.CreateOptions{}) } defaultFile, err := os.ReadFile(fmt.Sprintf("testdata/waypoint/%s", tt.expectedOutFile)) if err != nil { t.Fatal(err) } expectedOut := string(defaultFile) if len(expectedOut) == 0 { t.Fatal("expected output is empty") }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Thu Apr 04 15:53:09 GMT 2024 - 4.4K bytes - Viewed (0) -
cni/pkg/install/cniconfig.go
return writeCNIConfig(ctx, cniConfig, getPluginConfig(cfg)) } func readCNIConfigTemplate(template cniConfigTemplate) ([]byte, error) { if file.Exists(template.cniNetworkConfigFile) { cniConfig, err := os.ReadFile(template.cniNetworkConfigFile) if err != nil { return nil, err } installLog.Infof("Using CNI config template from %s", template.cniNetworkConfigFile) return cniConfig, nil }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 10.4K bytes - Viewed (0) -
cni/pkg/plugin/plugin_dryrun_test.go
generated, err := os.ReadFile(outputFilePath) if err != nil { log.Fatalf("Cannot read generated IPTables rule file: %v", err) } generatedRules := getRules(generated) refreshGoldens(t, tt.golden, generatedRules) // Compare generated iptables rule with golden files. golden, err := os.ReadFile(tt.golden) if err != nil {
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Sat Feb 10 00:31:55 GMT 2024 - 8.4K bytes - Viewed (0) -
internal/s3select/simdj/reader_amd64_test.go
Fatal(args ...interface{}) } func loadCompressed(t tester, file string) (js []byte) { dec, err := zstd.NewReader(nil) if err != nil { t.Fatal(err) } defer dec.Close() js, err = os.ReadFile(filepath.Join("testdata", file+".json.zst")) if err != nil { t.Fatal(err) } js, err = dec.DecodeAll(js, nil) if err != nil { t.Fatal(err) } return js } var testCases = []struct {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Sep 19 18:05:16 GMT 2022 - 3.9K bytes - Viewed (0) -
cmd/storage-interface.go
// File operations. ListDir(ctx context.Context, origvolume, volume, dirPath string, count int) ([]string, error) ReadFile(ctx context.Context, volume string, path string, offset int64, buf []byte, verifier *BitrotVerifier) (n int64, err error) AppendFile(ctx context.Context, volume string, path string, buf []byte) (err error)
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Tue Apr 23 17:15:52 GMT 2024 - 4.9K bytes - Viewed (0) -
cni/pkg/util/pluginutil.go
return } errChan <- err } } } // Read CNI config from file and return the unmarshalled JSON as a map func ReadCNIConfigMap(path string) (map[string]any, error) { cniConfig, err := os.ReadFile(path) if err != nil { return nil, err } var cniConfigMap map[string]any if err = json.Unmarshal(cniConfig, &cniConfigMap); err != nil { return nil, fmt.Errorf("%s: %w", path, err) }
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Fri Jan 26 20:34:28 GMT 2024 - 3.6K bytes - Viewed (0) -
istioctl/pkg/workload/workload_test.go
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Mar 27 16:59:05 GMT 2024 - 14.6K bytes - Viewed (0) -
cmd/handler-api.go
cgroupV2MemLimitFile = "/sys/fs/cgroup/memory.max" cgroupMemNoLimit = 9223372036854771712 ) func cgroupMemLimit() (limit uint64) { buf, err := os.ReadFile(cgroupV2MemLimitFile) if err != nil { buf, err = os.ReadFile(cgroupV1MemLimitFile) } if err != nil { return 0 } limit, err = strconv.ParseUint(strings.TrimSpace(string(buf)), 10, 64) if err != nil {
Go - Registered: Sun Apr 28 19:28:10 GMT 2024 - Last Modified: Mon Apr 08 09:22:27 GMT 2024 - 10K 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{},
Go - Registered: Wed May 01 22:53:12 GMT 2024 - Last Modified: Wed Apr 10 21:51:29 GMT 2024 - 8.9K bytes - Viewed (0)