Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for getPathContext (0.12 sec)

  1. operator/pkg/tpath/util.go

    func GetConfigSubtree(manifest, path string) (string, error) {
    	root := make(map[string]any)
    	if err := yaml2.Unmarshal([]byte(manifest), &root); err != nil {
    		return "", err
    	}
    
    	nc, _, err := GetPathContext(root, util.PathFromString(path), false)
    	if err != nil {
    		return "", err
    	}
    	out, err := yaml2.Marshal(nc.Node)
    	if err != nil {
    		return "", err
    	}
    	return string(out), nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jul 25 19:30:47 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  2. operator/pkg/patch/patch.go

    		if strings.TrimSpace(p.Path) == "" {
    			scope.Warnf("value=%s has empty path, skip\n", v)
    			continue
    		}
    		scope.Debugf("applying path=%s, value=%s\n", p.Path, v)
    		inc, _, err := tpath.GetPathContext(bo, util.PathFromString(p.Path), true)
    		if err != nil {
    			errs = util.AppendErr(errs, err)
    			metrics.ManifestPatchErrorTotal.Increment()
    			continue
    		}
    
    		err = tpath.WritePathContext(inc, v, false)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 10 15:35:03 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top