Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for FindStringSubmatch (0.28 sec)

  1. internal/handlers/proxy.go

    		// we simply ignore the values and return empty. This is in line
    		// with the approach we took for returning first ip from multiple
    		// params.
    		if match := forRegex.FindStringSubmatch(proto); len(match) > 1 {
    			if match = protoRegex.FindStringSubmatch(match[2]); len(match) > 1 {
    				scheme = strings.ToLower(match[2])
    			}
    		}
    	}
    
    	return scheme
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Dec 22 00:56:55 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  2. istioctl/pkg/authz/listener.go

    	}
    	return parsedListeners
    }
    
    func extractName(name string) (string, string) {
    	// parts[1] is the namespace, parts[2] is the policy name, parts[3] is the rule index.
    	parts := re.FindStringSubmatch(name)
    	if len(parts) != 4 {
    		log.Errorf("failed to parse policy name: %s", name)
    		return "", ""
    	}
    	return fmt.Sprintf("%s.%s", parts[2], parts[1]), parts[3]
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Mon Sep 11 15:29:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. docs/debugging/pprofgoparser/main.go

    			reset()
    			record = false
    			if searchRE == nil || searchRE.MatchString(stackTrace) {
    				ret[t] = append(ret[t], stackTrace)
    			}
    		case record:
    			save(line)
    		default:
    			z := goroutinesRE.FindStringSubmatch(line)
    			if len(z) == 3 {
    				if z[2] != "" {
    					a, _ := strconv.Atoi(z[2])
    					t = time.Duration(a) * time.Minute
    					save(line)
    					record = true
    				} else {
    					skip = true
    				}
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Mar 06 11:43:16 GMT 2024
    - 3.4K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/asm/endtoend_test.go

    	}
    
    	errors := map[string]string{}
    	for _, line := range strings.Split(errBuf.String(), "\n") {
    		if line == "" || strings.HasPrefix(line, "\t") {
    			continue
    		}
    		m := fileLineRE.FindStringSubmatch(line)
    		if m == nil {
    			t.Errorf("unexpected error: %v", line)
    			continue
    		}
    		fileline := m[1]
    		if errors[fileline] != "" && errors[fileline] != line {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  5. cmd/http-tracer.go

    )
    
    var ldapPwdRegex = regexp.MustCompile("(^.*?)LDAPPassword=([^&]*?)(&(.*?))?$")
    
    // redact LDAP password if part of string
    func redactLDAPPwd(s string) string {
    	parts := ldapPwdRegex.FindStringSubmatch(s)
    	if len(parts) > 3 {
    		return parts[1] + "LDAPPassword=*REDACTED*" + parts[3]
    	}
    	return s
    }
    
    // getOpName sanitizes the operation name for mc
    func getOpName(name string) (op string) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  6. cni/pkg/nodeagent/podcgroupns.go

    		// non-punctuation end of string, i.e., the container ID
    		`(?P<containerid>[[:^punct:]]+)$`),
    }
    
    func reSubMatchMap(r *regexp.Regexp, str string) map[string]string {
    	match := r.FindStringSubmatch(str)
    	if match == nil {
    		return nil
    	}
    	subMatchMap := make(map[string]string)
    	for i, name := range r.SubexpNames() {
    		if i != 0 {
    			subMatchMap[name] = match[i]
    		}
    	}
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 11K bytes
    - Viewed (0)
  7. istioctl/pkg/describe/describe.go

    	// nolint: gosimple
    	re := regexp.MustCompile("/apis/networking(\\.istio\\.io)?/v1alpha3/namespaces/(?P<namespace>[^/]+)/virtual-service/(?P<name>[^/]+)")
    	ss := re.FindStringSubmatch(path)
    	if ss == nil {
    		return "", "", fmt.Errorf("not a VS path: %s", path)
    	}
    	return ss[3], ss[2], nil
    }
    
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 50.4K bytes
    - Viewed (0)
  8. cmd/handler-utils.go

    	}
    	return path, nil
    }
    
    var regexVersion = regexp.MustCompile(`^/minio.*/(v\d+)/.*`)
    
    func extractAPIVersion(r *http.Request) string {
    	if matches := regexVersion.FindStringSubmatch(r.URL.Path); len(matches) > 1 {
    		return matches[1]
    	}
    	return "unknown"
    }
    
    func methodNotAllowedHandler(api string) func(w http.ResponseWriter, r *http.Request) {
    	return errorResponseHandler
    }
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
  9. chainable_api.go

    	tx = db.getInstance()
    	if strings.Contains(name, " ") || strings.Contains(name, "`") || len(args) > 0 {
    		tx.Statement.TableExpr = &clause.Expr{SQL: name, Vars: args}
    		if results := tableRegexp.FindStringSubmatch(name); len(results) == 3 {
    			if results[1] != "" {
    				tx.Statement.Table = results[1]
    			} else {
    				tx.Statement.Table = results[2]
    			}
    		}
    	} else if tables := strings.Split(name, "."); len(tables) == 2 {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Apr 17 03:38:55 GMT 2024
    - 14.3K bytes
    - Viewed (1)
  10. statement.go

    	nameMatcher := regexp.MustCompile(`^(?:\W?(\w+?)\W?\.)?(?:(\*)|\W?(\w+?)\W?)$`)
    	return func(tableColumn string) (table, column string) {
    		if matches := nameMatcher.FindStringSubmatch(tableColumn); len(matches) == 4 {
    			table = matches[1]
    			star := matches[2]
    			columnName := matches[3]
    			if star != "" {
    				return table, star
    			}
    			return table, columnName
    		}
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Jan 12 08:42:21 GMT 2024
    - 19.8K bytes
    - Viewed (0)
Back to top