routescan

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package routescan statically discovers Fiber routes in a generated project.

It starts at func main, tracks variables holding a *fiber.App or a group (fiber.New, x.Group("prefix")), follows calls that pass those variables into functions of the same module, and records every x.Get/Post/... call with the fully joined path. Nothing is compiled or executed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Duplicates

func Duplicates(routes []Route) []string

Duplicates returns "METHOD path" entries registered more than once. Fiber silently serves only the first registration.

Types

type Route

type Route struct {
	Method  string `json:"method"`
	Path    string `json:"path"`
	Handler string `json:"handler"`
	Source  string `json:"source"`
}

func Scan

func Scan(projectPath string) ([]Route, error)

Scan returns the routes reachable from func main in projectPath, sorted by path and method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL