list
gox list shows the Go dependencies of the project.
By default, it shows the direct dependencies declared in gox.json. The installation and administration of these modules is developed in Dependencies.
Use
gox list | Option | Description |
|---|---|
| -t | It includes transitive dependencies. |
| --transient | It includes transitive dependencies. |
The command does not accept arguments.
Direct dependencies
No options, gox list only the direct dependencies declared in the gox.json.
gox list Ejemplo:
github.com/google/uuid latest
github.com/gox-lang/gox v1.0.0
github.com/shopspring/decimal latest Each dependency occupies a line with the format:
<module> <version> The module and version are separated by a tabulator. The dependencies are alphabetically ordered by the module path.
The version corresponds to the value declared in gox.json, so it can be a concrete version like v1.0.0 or latest.
Transitive dependencies
The options -t and --transitive include the transitive dependencies of the project:
gox list -t gox list --transitive Both options are equivalent.
In this mode the same output format is maintained:
<module> <version> The versions correspond to the versions resolved in the Go module graph.
For example:
github.com/google/uuid v1.6.0
github.com/gox-lang/gox v1.0.0
github.com/shopspring/decimal v1.4.0 For this reason, a dependency declared as latest can appear with a specific version.
Best practices
- Use
gox listto consult the dependencies declared directly by the project. - Use
-tor--transitivewhen you also need to consult the transitive dependencies and their solved versions. - Use the versions shown by
gox list -twhen you need to know exactly what versions are part of the current graph.