list

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package list builds a markdown inventory of PHP routes, files and classes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandFiles

func ExpandFiles(paths []string) ([]string, error)

ExpandFiles resolves path arguments to a sorted list of PHP file paths. Path forms match Go's package patterns:

  • "." or "dir": .php/.phpt files in that directory only (non-recursive)
  • "./..." or "dir/...": that directory and all subdirectories
  • "file.php": that file

When paths is empty, "." is used.

func Markdown

func Markdown(rows []Row) string

Markdown renders rows as an indented, padded GitHub-flavoured markdown table.

Types

type Row

type Row struct {
	Route    string // e.g. "GET /users/{id}", "@startup", or empty
	Filename string // slash-separated path relative to the working directory
	Classes  string // comma-separated FQNs, or empty
}

Row is one markdown table row.

func File

func File(path string) ([]Row, error)

File returns inventory rows for one PHP source file.

func Paths

func Paths(paths []string) ([]Row, error)

Paths scans path arguments and returns inventory rows.

Jump to

Keyboard shortcuts

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