Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zosmac/godep
GO module package DEPendency graph.
https://github.com/zosmac/godep
golang graphviz svg
Last synced: about 1 month ago
JSON representation
GO module package DEPendency graph.
- Host: GitHub
- URL: https://github.com/zosmac/godep
- Owner: zosmac
- License: other
- Created: 2023-01-05T21:40:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T23:56:22.000Z (9 months ago)
- Last Synced: 2024-06-21T08:31:32.159Z (7 months ago)
- Topics: golang, graphviz, svg
- Language: Go
- Homepage:
- Size: 102 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Welcome to *Godep*: *Go* module package *dep*endency graph
- [Welcome to *Godep*: *Go* module package dependency graph](#welcome-to-godep-go-module-package-dependency-graph)
- [Overview](#overview)
- [Installing *Godep*](#installing-godep)
- [Using *Godep*](#using-godep)
- [Notices](#notices)## Overview
The `godep` command parses the Go module in the current directory using the standard library's `go/ast` package. It builds a package dependency graph for the *[Graphviz]()* `dot` command that produces a SVG file for display.
## Installing *Godep*
The `godep` command depends on *Graphviz*. To download and install *[Graphviz]()*, select a stable release, download its tar file, build, and install.
```zsh
tar xzvf =(curl -L "https://gitlab.com/api/v4/projects/4207231/packages/generic/graphviz-releases/7.1.0/graphviz-7.1.0.tar.gz")
cd graphviz-7.1.0
./configure
make
sudo make install
```With the `dot` command in place, download and install *Godep*:
```zsh
go install github.com/zosmac/godep@latest
```## Using *Godep*
The `godep` command takes no arguments. Set the current directory to that for a Go language module, defined by a `go.mod` file. Direct the standard output to a SVG file and open in a browser.
```zsh
() {
godep >$1
mv $1 $1.svg
open $1.svg
sleep 1
rm $1.svg
} `mktemp /tmp/XXXXXX`
```![gomon module package dependencies](assets/gomon.svg)
## Notices
Copyright © 2023 The Gomon Project.