Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for possiblyConflictingPatterns (0.26 sec)

  1. src/net/http/routing_index.go

    				key.s = seg.s
    			}
    			idx.segments[key] = append(idx.segments[key], pat)
    		}
    	}
    }
    
    // possiblyConflictingPatterns calls f on all patterns that might conflict with
    // pat. If f returns a non-nil error, possiblyConflictingPatterns returns immediately
    // with that error.
    //
    // To be correct, possiblyConflictingPatterns must include all patterns that
    // might conflict. But it may also include patterns that cannot conflict.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 19 18:35:22 UTC 2023
    - 4K bytes
    - Viewed (0)
  2. src/net/http/routing_index_test.go

    		if pat.conflictsWith(p) {
    			s = append(s, p.String())
    		}
    	}
    	slices.Sort(s)
    	return s
    }
    
    func indexConflicts(pat *pattern, idx *routingIndex) []string {
    	var s []string
    	idx.possiblyConflictingPatterns(pat, func(p *pattern) error {
    		if pat.conflictsWith(p) {
    			s = append(s, p.String())
    		}
    		return nil
    	})
    	slices.Sort(s)
    	return slices.Compact(s)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 22:14:00 UTC 2024
    - 4K bytes
    - Viewed (0)
  3. src/net/http/server.go

    		pat.loc = "unknown location"
    	} else {
    		pat.loc = fmt.Sprintf("%s:%d", file, line)
    	}
    
    	mux.mu.Lock()
    	defer mux.mu.Unlock()
    	// Check for conflict.
    	if err := mux.index.possiblyConflictingPatterns(pat, func(pat2 *pattern) error {
    		if pat.conflictsWith(pat2) {
    			d := describeConflict(pat, pat2)
    			return fmt.Errorf("pattern %q (registered at %s) conflicts with pattern %q (registered at %s):\n%s",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
Back to top