graph

gox graph analyzes a file .gox and shows his graph of dependencies.

The command distinguishes imports of Go, GOX modules, Client components and internal dependencies of the Client bundles.


Use

bash
gox graph <filepath.gox> [options]
gox graph --r <route> [options]
OptionDescription
--r, -routeHe interprets the entry as a public route.
--v, -verboseIt shows details of the type of dependency.
--f, -filter Select families from dependencies.

Files

The basic form receives a route relative to the root of the project:

bash
gox graph pages/index.gox

The route must end in .gox. It can't be absolute, contain .. or escape from the root of the project.

The analysis follows the GOX modules and imports can be reached from the entrance.


Public routes

--r and -route allow to use a Page route:

bash
gox graph --r /
gox graph -route /users/profile

GOX compiles the configuration, applies the route rules and resolves the corresponding Page. The resolution uses the same model documented in Routing.

No requests, fragments, hidden routes, segments . or .., spaces, double bars or static destinations.


Filters

-filter receives a combination of letters:

LetraFamily
gGo packages.
xGOX modules.
cClient components.
dCustomer bundle dependencies.
bash
gox graph pages/index.gox -filter gx
gox graph pages/index.gox --f cd
gox graph pages/index.gox -filter=gxcd

Request d includes also the Customer components needed to present these dependencies. Without filter all families are shown.

An empty filter, an unknown letter or the omission of the value makes an error.


Detailed output

bash
gox graph pages/index.gox -verbose

The normal output shows the tree and a summary with the amount of Go, GOX, Client and Customer dependencies. -verbose add classification details to your labels.

The cycles are identified in the tree to avoid infinite expansion.


Client Components

When the filter includes d, GOX prepares the necessary assets to inspect the graph produced by the framework and to relate it to the statements Client.

The analysis may require the workspace of the framework to be properly installed.


Errors

The command requires a single input. An unknown option, an invalid route, a file without extension .gox, a non-existing Page or a static destination interrupts the analysis.

--r and -route change the interpretation of the entry; they do not represent a second independent route.


Best practices

  • Start with the complete output before applying filters.
  • Use public routes when you want to analyze the router's behavior.
  • Use files when you need to inspect a specific input.
  • Add -verbose only when you need to distinguish the exact types.
  • Check unexpected customer cycles and dependencies before optimizing bundles.

See also

Next step

Continue with test to execute the tests and benchmarks declared by the project.

test