Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for PathN (1.3 sec)

  1. operator/pkg/util/path.go

    	v, _ := RemoveBrackets(pe)
    	if len(v) > 0 {
    		return v, nil
    	}
    	return "", fmt.Errorf("%s is not a valid value path element", pe)
    }
    
    // PathN returns the index part of the entire value path element.
    // It returns an error if pe is not an index path element.
    func PathN(pe string) (int, error) {
    	if !IsNPathElement(pe) {
    		return -1, fmt.Errorf("%s is not a valid index path element", pe)
    	}
    	v, _ := RemoveBrackets(pe)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Dec 12 17:12:54 UTC 2023
    - 5.5K bytes
    - Viewed (0)
  2. internal/logger/logger.go

    	// Add trim string "{GOROOT}/src/" into trimStrings
    	trimStrings = []string{filepath.Join(runtime.GOROOT(), "src") + string(filepath.Separator)}
    
    	// Add all possible path from GOPATH=path1:path2...:pathN
    	// as "{path#}/src/" into trimStrings
    	for _, goPathString := range goPathList {
    		trimStrings = append(trimStrings, filepath.Join(goPathString, "src")+string(filepath.Separator))
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 12.4K bytes
    - Viewed (0)
  3. operator/pkg/tpath/tree.go

    		scope.Debug("list type")
    		// If the path element has the form [N], a list element is being selected by index. Return the element at index
    		// N if it exists.
    		if util.IsNPathElement(pe) {
    			idx, err := util.PathN(pe)
    			if err != nil {
    				return nil, false, fmt.Errorf("path %s, index %s: %s", fullPath, pe, err)
    			}
    			var foundNode any
    			if idx >= len(lst) || idx < 0 {
    				if !createMissing {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 17.5K bytes
    - Viewed (0)
Back to top