Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 1,140 for filedata (0.22 sec)

  1. pkg/test/util/tmpl/evaluate.go

    func Evaluate(tpl string, data any) (string, error) {
    	t, err := Parse(tpl)
    	if err != nil {
    		return "", err
    	}
    
    	return Execute(t, data)
    }
    
    func EvaluateFile(filePath string, data any) (string, error) {
    	tpl, err := file.AsString(filePath)
    	if err != nil {
    		return "", err
    	}
    	return Evaluate(tpl, data)
    }
    
    // EvaluateOrFail calls Evaluate and fails tests if it returns error.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/componentconfigs/kubelet_windows.go

    	}
    	drive := filepath.VolumeName(filepath.Dir(exe))
    	klog.V(2).Infof("[componentconfig] Assuming Windows drive %q", drive)
    
    	// Mutate the paths in the config.
    	mutatePaths(&kc.config, drive)
    	return nil
    }
    
    func mutatePaths(cfg *kubeletconfig.KubeletConfiguration, drive string) {
    	mutateStringField := func(name string, field *string) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 25 10:26:46 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  3. src/internal/coverage/pods/pods_test.go

    		return mkfile(dir, fn)
    	}
    
    	trim := func(path string) string {
    		b := filepath.Base(path)
    		d := filepath.Dir(path)
    		db := filepath.Base(d)
    		return db + "/" + b
    	}
    
    	podToString := func(p pods.Pod) string {
    		rv := trim(p.MetaFile) + " [\n"
    		for k, df := range p.CounterDataFiles {
    			rv += trim(df)
    			if p.Origins != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 14:00:17 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  4. tests/fuzz/regression_test.go

    			by, err := os.ReadFile(filepath.Join(dir, c.Name()))
    			if err != nil {
    				t.Fatal(err)
    			}
    			runfuzz(t, c.Name(), by)
    		})
    	}
    }
    
    func walkMatch(root string, pattern *regexp.Regexp) ([]string, error) {
    	var matches []string
    	err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
    		if err != nil {
    			return err
    		}
    		if filepath.Base(path) == "regression_test.go" {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 10 16:43:09 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  5. tools/docker-builder/builder/tar.go

    package builder
    
    import (
    	"archive/tar"
    	"io"
    	"io/fs"
    	"os"
    	"path/filepath"
    	"time"
    )
    
    func WriteArchiveFromFiles(base string, files map[string]string, out io.Writer) error {
    	tw := tar.NewWriter(out)
    	defer tw.Close()
    
    	for dest, srcRel := range files {
    		src := srcRel
    		if !filepath.IsAbs(src) {
    			src = filepath.Join(base, srcRel)
    		}
    		i, err := os.Stat(src)
    		if err != nil {
    			return err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 29 17:01:46 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/cgotest/overlaydir.go

    package cgotest
    
    import (
    	"io"
    	"os"
    	"path/filepath"
    	"strings"
    )
    
    // OverlayDir makes a minimal-overhead copy of srcRoot in which new files may be added.
    func OverlayDir(dstRoot, srcRoot string) error {
    	dstRoot = filepath.Clean(dstRoot)
    	if err := os.MkdirAll(dstRoot, 0777); err != nil {
    		return err
    	}
    
    	srcRoot, err := filepath.Abs(srcRoot)
    	if err != nil {
    		return err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 22 20:56:09 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. src/runtime/race/syso_test.go

    //go:build race
    
    package race
    
    import (
    	"bytes"
    	"os/exec"
    	"path/filepath"
    	"runtime"
    	"testing"
    )
    
    func TestIssue37485(t *testing.T) {
    	files, err := filepath.Glob("./*.syso")
    	if err != nil {
    		t.Fatalf("can't find syso files: %s", err)
    	}
    	for _, f := range files {
    		cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"), "tool", "nm", f)
    		res, err := cmd.CombinedOutput()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 725 bytes
    - Viewed (0)
  8. pkg/volume/util/hostutil/hostutil_test.go

    		},
    		"No Refs error": {
    			expectedError: fmt.Sprintf("directory %s is not mounted", path),
    		},
    		"No Matching refs": {
    			mountRefs:    []string{filepath.Join("foo", "lish")},
    			expectedPath: filepath.Base(path),
    		},
    		"Matched ref": {
    			mountRefs:    []string{filepath.Join(path, "lish")},
    			expectedPath: "lish",
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 01 16:02:07 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  9. src/cmd/go/internal/load/search.go

    			dir, pattern = pattern[:j], pattern[j+1:]
    		}
    		dir = filepath.Join(cwd, dir)
    		if pattern == "" {
    			return func(p *Package) bool { return p.Dir == dir }
    		}
    		matchPath := pkgpattern.MatchPattern(pattern)
    		return func(p *Package) bool {
    			// Compute relative path to dir and see if it matches the pattern.
    			rel, err := filepath.Rel(dir, p.Dir)
    			if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 16:43:40 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  10. cni/pkg/plugin/plugin_dryrun_test.go

    			},
    			proxyEnv: []corev1.EnvVar{},
    			golden:   filepath.Join(env.IstioSrc, "cni/pkg/plugin/testdata/include-exclude-ports.txt.golden"),
    		},
    		{
    			name: "tproxy",
    			annotations: map[string]string{
    				annotation.SidecarStatus.Name:           "true",
    				annotation.SidecarInterceptionMode.Name: redirectModeTPROXY,
    			},
    			proxyEnv: []corev1.EnvVar{},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Feb 10 00:31:55 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top