Home / Function/ findGreedyParamLen() — fiber Function Reference

findGreedyParamLen() — fiber Function Reference

Architecture documentation for the findGreedyParamLen() function in path.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  005070ba_d3d6_212f_36df_f3fc9f497c80["findGreedyParamLen()"]
  bedec411_93e0_4024_219e_79649f60a9be["path.go"]
  005070ba_d3d6_212f_36df_f3fc9f497c80 -->|defined in| bedec411_93e0_4024_219e_79649f60a9be
  2fd95810_2ada_ab11_b5e5_4579a806f839["findParamLen()"]
  2fd95810_2ada_ab11_b5e5_4579a806f839 -->|calls| 005070ba_d3d6_212f_36df_f3fc9f497c80
  style 005070ba_d3d6_212f_36df_f3fc9f497c80 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

path.go lines 605–618

func findGreedyParamLen(s string, searchCount int, segment *routeSegment) int {
	// check all from right to left segments
	for i := segment.PartCount; i > 0 && searchCount > 0; i-- {
		searchCount--

		constPosition := strings.LastIndex(s, segment.ComparePart)
		if constPosition == -1 {
			break
		}
		s = s[:constPosition]
	}

	return len(s)
}

Domain

Subdomains

Defined In

Called By

Frequently Asked Questions

What does findGreedyParamLen() do?
findGreedyParamLen() is a function in the fiber codebase, defined in path.go.
Where is findGreedyParamLen() defined?
findGreedyParamLen() is defined in path.go at line 605.
What calls findGreedyParamLen()?
findGreedyParamLen() is called by 1 function(s): findParamLen.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free