Home / Function/ FromParam() — fiber Function Reference

FromParam() — fiber Function Reference

Architecture documentation for the FromParam() function in extractors.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  2c304ebd_1428_63a9_c733_61d51971104b["FromParam()"]
  9369d97d_10d6_c835_81b9_8542715b2822["extractors.go"]
  2c304ebd_1428_63a9_c733_61d51971104b -->|defined in| 9369d97d_10d6_c835_81b9_8542715b2822
  style 2c304ebd_1428_63a9_c733_61d51971104b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

extractors/extractors.go lines 220–236

func FromParam(param string) Extractor {
	return Extractor{
		Extract: func(c fiber.Ctx) (string, error) {
			value := c.Params(param)
			if value == "" {
				return "", ErrNotFound
			}
			unescapedValue, err := url.PathUnescape(value)
			if err != nil {
				return "", ErrNotFound
			}
			return unescapedValue, nil
		},
		Key:    param,
		Source: SourceParam,
	}
}

Domain

Subdomains

Frequently Asked Questions

What does FromParam() do?
FromParam() is a function in the fiber codebase, defined in extractors/extractors.go.
Where is FromParam() defined?
FromParam() is defined in extractors/extractors.go at line 220.

Analyze Your Own Codebase

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

Try Supermodel Free