Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 720 for readFiles (0.17 sec)

  1. istioctl/pkg/writer/envoy/configdump/ecds_test.go

    	cw := &ConfigWriter{Stdout: gotOut}
    	cd, _ := os.ReadFile("testdata/ecds/configdump.json")
    	cw.Prime(cd)
    	err := cw.PrintEcdsSummary()
    	assert.NoError(t, err)
    
    	util.CompareContent(t, gotOut.Bytes(), "testdata/ecds/output.txt")
    }
    
    func TestPrintEcdsYaml(t *testing.T) {
    	gotOut := &bytes.Buffer{}
    	cw := &ConfigWriter{Stdout: gotOut}
    	cd, _ := os.ReadFile("testdata/ecds/configdump.json")
    	cw.Prime(cd)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 13 01:08:07 UTC 2022
    - 1.9K bytes
    - Viewed (0)
  2. pkg/test/util/file/file.go

    	"io"
    	"os"
    	"path/filepath"
    	"strings"
    
    	"github.com/mitchellh/go-homedir"
    
    	"istio.io/istio/pkg/test"
    )
    
    // AsBytes is a simple wrapper around os.ReadFile provided for completeness.
    func AsBytes(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    // AsBytesOrFail calls AsBytes and fails the test if any errors occurred.
    func AsBytesOrFail(t test.Failer, filename string) []byte {
    	t.Helper()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 17 02:22:22 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  3. src/cmd/go/internal/robustio/robustio_other.go

    //go:build !windows && !darwin
    
    package robustio
    
    import (
    	"os"
    )
    
    func rename(oldpath, newpath string) error {
    	return os.Rename(oldpath, newpath)
    }
    
    func readFile(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    func removeAll(path string) error {
    	return os.RemoveAll(path)
    }
    
    func isEphemeralError(err error) bool {
    	return false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 516 bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Resources.java

       */
      @CanIgnoreReturnValue // some processors won't return a useful result
      @ParametricNullness
      public static <T extends @Nullable Object> T readLines(
          URL url, Charset charset, LineProcessor<T> callback) throws IOException {
        return asCharSource(url, charset).readLines(callback);
      }
    
      /**
       * Reads all of the lines from a URL. The lines do not include line-termination characters, but do
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Feb 28 20:13:02 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  5. pilot/test/util/diff.go

    		if err := file.AtomicWrite(goldenFile, content, os.FileMode(0o644)); err != nil {
    			t.Fatal(err.Error())
    		}
    	}
    }
    
    // ReadFile reads the content of the given file or fails the test if an error is encountered.
    func ReadFile(t test.Failer, file string) []byte {
    	t.Helper()
    	golden, err := os.ReadFile(file)
    	if err != nil {
    		t.Fatal(err.Error())
    	}
    	return golden
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 05 08:53:20 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/counter/countertest/countertest.go

    func ReadStackCounter(c *counter.StackCounter) (stackCounts map[string]uint64, _ error) {
    	return ic.ReadStack(c)
    }
    
    // ReadFile reads the counters and stack counters from the given file.
    func ReadFile(name string) (counters, stackCounters map[string]uint64, _ error) {
    	return ic.ReadFile(name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:13:09 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  7. src/embed/embed.go

    	}
    	list := make([]fs.DirEntry, len(dir.files))
    	for i := range list {
    		list[i] = &dir.files[i]
    	}
    	return list, nil
    }
    
    // ReadFile reads and returns the content of the named file.
    func (f FS) ReadFile(name string) ([]byte, error) {
    	file, err := f.Open(name)
    	if err != nil {
    		return nil, err
    	}
    	ofile, ok := file.(*openFile)
    	if !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:42:51 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  8. src/syscall/mkasm.go

    	syscallArchFilename := fmt.Sprintf("syscall_%s_%s.go", goos, arch)
    
    	in1, err := os.ReadFile(syscallFilename)
    	if err != nil {
    		log.Fatalf("can't open syscall file: %s", err)
    	}
    	in2, err := os.ReadFile(syscallArchFilename)
    	if err != nil {
    		log.Fatalf("can't open syscall file: %s", err)
    	}
    	in3, err := os.ReadFile("z" + syscallArchFilename)
    	if err != nil {
    		log.Fatalf("can't open syscall file: %s", err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 03:24:15 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/test_race_install_cgo.txt

    	"fmt"
    	"os"
    	"time"
    )
    
    
    func main() {
    	var t1 time.Time
    	b1, err := os.ReadFile(os.Args[1])
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    	if err := json.Unmarshal(b1, &t1); err != nil  {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    
    	var t2 time.Time
    	b2, err := os.ReadFile(os.Args[2])
    	if err != nil {
    		fmt.Fprintln(os.Stderr, err)
    		os.Exit(1)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 27 14:03:15 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  10. src/net/unixsock_readmsg_test.go

    	}
    
    	writeFile := os.NewFile(uintptr(fds[0]), "write-socket")
    	defer writeFile.Close()
    	readFile := os.NewFile(uintptr(fds[1]), "read-socket")
    	defer readFile.Close()
    
    	cw, err := FileConn(writeFile)
    	if err != nil {
    		t.Fatalf("FileConn: %v", err)
    	}
    	defer cw.Close()
    	cr, err := FileConn(readFile)
    	if err != nil {
    		t.Fatalf("FileConn: %v", err)
    	}
    	defer cr.Close()
    
    	ucw, ok := cw.(*UnixConn)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 09:15:25 UTC 2023
    - 2.5K bytes
    - Viewed (0)
Back to top