All Projects → Helcaraxan → Gomod

Helcaraxan / Gomod

Licence: mit
Go modules analysis tool

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Gomod

Gobinaries
Golang binaries compiled on-demand for your system
Stars: ✭ 672 (+383.45%)
Mutual labels:  golang-tools
Golang Plugin
Automatically installs the Go tools on Jenkins build agents
Stars: ✭ 49 (-64.75%)
Mutual labels:  golang-tools
Go Mygen
Quickly generate CURD and documentation for operating MYSQL.etc
Stars: ✭ 94 (-32.37%)
Mutual labels:  golang-tools
Dalfox
🌘🦊 DalFox(Finder Of XSS) / Parameter Analysis and XSS Scanning tool based on golang
Stars: ✭ 791 (+469.06%)
Mutual labels:  golang-tools
Interact
Question/answer and multiple choice by command line
Stars: ✭ 43 (-69.06%)
Mutual labels:  golang-tools
Gogi
Go client for gitignore.io
Stars: ✭ 51 (-63.31%)
Mutual labels:  golang-tools
Gowrap
GoWrap is a command line tool for generating decorators for Go interfaces
Stars: ✭ 464 (+233.81%)
Mutual labels:  golang-tools
Gocmt
Add missing comment on exported function, method, type, constant, variable in go file
Stars: ✭ 111 (-20.14%)
Mutual labels:  golang-tools
Gogeom
This is a Geometrical library for Go Language. Which includes multiple Geometrical calculations like Circle, Lines etc in different forms
Stars: ✭ 47 (-66.19%)
Mutual labels:  golang-tools
Goreuse
Generic Code for Go
Stars: ✭ 93 (-33.09%)
Mutual labels:  golang-tools
Stegify
🔍 Go tool for LSB steganography, capable of hiding any file within an image.
Stars: ✭ 927 (+566.91%)
Mutual labels:  golang-tools
Go Benchmark App
Application for HTTP benchmarking via different rules and configs
Stars: ✭ 21 (-84.89%)
Mutual labels:  golang-tools
Go Search Extension
The ultimate search extension for Golang
Stars: ✭ 69 (-50.36%)
Mutual labels:  golang-tools
Goggles
🔭 Goggles is a cross-platform GUI for your $GOPATH!
Stars: ✭ 672 (+383.45%)
Mutual labels:  golang-tools
Vermin
The smart virtual machines manager. A modern CLI for Vagrant Boxes.
Stars: ✭ 110 (-20.86%)
Mutual labels:  golang-tools
Richgo
Enrich `go test` outputs with text decorations.
Stars: ✭ 544 (+291.37%)
Mutual labels:  golang-tools
Ebreader
一个让你可以在浏览器中阅读Epub电子书的CLI程序,使用Golang编写
Stars: ✭ 50 (-64.03%)
Mutual labels:  golang-tools
Goreportcard
A report card for your Go application
Stars: ✭ 1,608 (+1056.83%)
Mutual labels:  golang-tools
Scopelint
scopelint checks for unpinned variables in go programs
Stars: ✭ 110 (-20.86%)
Mutual labels:  golang-tools
Marlow
golang generator for type-safe sql api constructs
Stars: ✭ 83 (-40.29%)
Mutual labels:  golang-tools

Go Modules clarified

License: MIT Build Status Maintainability Test Coverage

gomod is your one-stop-solution for making sense of your project's dependency graph. It supports the querying and visualising of the graphs of both your Go module dependencies as well as the underlying package import graph. It also comes with built-in analysis tools that extract information from the dependency graph that is usually hidden or hard to get to via other means.

Typical questions that gomod will help you answer are:

  • Why does my project have this module or package as a dependency.
  • What dependency chains lead to github.com/foo/bar and what constraints do they put on versions?
  • How old are the modules that my project depends on, and how much out-of-date are these?
  • Are different dependencies of my project using potentially conflicting forks of the same module?

Table of Contents

Detailed features

Dependency analysis commands

gomod graph

Output your module dependency or package import graph in DOT format. You can filter out noise from the graph by tailoring your query to your needs. You can also add annotations to provide further information on the generated graph. By default gomod graph will act on the module graph, however by using the --packages flag it will consider the package import graph instead.

If no query is specified the full graph, including test-only dependencies will be produced.

Querying is done by means of a simple language that supports the following features:

Filter Syntax Feature
github.com/**/lib/* Filter based on paths, including the ability to use wildcards. * matches a single path elements, ** matches any number of path elements.
github.com/foo/bar:test Include test-only dependencies matched by the specified pattern.
deps(<filter>[, <int>]) Consider all dependencies of the elements matches by the nested filter, potentially limited to a certain depth. For reverse dependencies use the similar rdeps function.
shared(<filter>) Consider only nodes that have more than one predecessor (i.e are a dependency required by more than one source).
<filter> <operator> <filter> Perform a set-based operation (+, -, inter or delta) on the outcomes of the two given filters.

Some examples:

  • Print the full dependency graph of this module (not including test-only dependencies):

    gomod graph '**'
    
  • Print the graph of all shared dependencies, including test-only ones, of a given package. source.

    gomod graph --packages 'shared(deps(github.com/my/module/library/pkg:test))'
    
  • Show only the dependency graph leading to the gopkg.in/yaml.v2 and gopkg.in/yaml.v3 modules:

    gomod graph 'rdeps(gopkg.in/yaml.v2:test + gopkg.in/yaml.v3:test)'
    
  • Show the same dependency graph as above but limited to the paths shared between both modules. Note that the resulting graph will not include the two targeted modules themselves.

    gomod graph 'rdeps(gopkg.in/yaml.v2:test) inter rdeps(gopkg.in/yaml.v3:test)'
    

If you want to create an image based on the generated text-based DOT content you need to use the dot tool which you will need to install separately.

The generated graph is colour and shape-coded:

  • Each module, or group of packages belonging to the same module, has a distinct colour.
  • Test-only dependencies are recognisable by the use of a lighter colour-palette.
  • Test-only edges are recognisable by a light blue colour.
  • Edges reflecting indirect module dependencies are marked with dashed instead of continuos lines.

gomod reveal

Show all the places at which your (indirect) module dependencies use replace statements which you might need to account for in your own go.mod in order to build your project.

gomod analyse

Produce a short statistical report of what is going on with your dependencies. The report includes things like (in)direct dependency counts, mean and max dependency ages, dependency age distribution, and more.

NB: This command can also be invoked as gomod analyze for those who intuitively use American spelling.

Example output

Full dependency graph

The entire dependency graph for the gomod codebase, using clustering to reduce the image size. Full dependency graph

Shared dependencies

Graph with only the shared dependencies for the gomod project. Shared dependencies graph

Dependency chains

Specific zoom on the dependency chains leading to the github.com/stretchr/testify module with version annotations. Annotated dependency chains for github.com/stretchr/testify

Hidden replace's

Revealing hidden replaces in the Matterbridge dependency graph. One is accounted for, the other is not. This can be the cause of unexpected errors when building the project.

 -> gomod reveal
'github.com/Rhymen/go-whatsapp' is replaced:
   maunium.net/go/mautrix-whatsapp -> github.com/tulir/go-whatsapp @ v0.0.2-0.20190528182350-fde573a2a73b

'gopkg.in/russross/blackfriday.v2' is replaced:
 ✓ maunium.net/go/mautrix            -> github.com/russross/blackfriday/v2 @ v2.0.1
 ✓ maunium.net/go/mautrix-appservice -> github.com/russross/blackfriday/v2 @ v2.0.1
 ✓ maunium.net/go/mautrix-whatsapp   -> github.com/russross/blackfriday/v2 @ v2.0.1

[✓] Match with a top-level replace in 'github.com/42wim/matterbridge'

Dependency statistics

Statistical analysis of the gomod dependency graph.

 -> gomod analyse
-- Analysis for 'github.com/Helcaraxan/gomod' --
Dependency counts:
- Direct dependencies:   10
- Indirect dependencies: 28

Age statistics:
- Mean age of dependencies: 15 month(s) 18 day(s)
- Maximum dependency age:   58 month(s) 17 day(s)
- Age distribution per month:

  18.42 % |          #
          |          #
          |          #
          |          #
          |    _   _ #   _   _
          |    #   # #   #   #
          |    #   # #   #   #
          |  _ # _ # # _ #   #     _
          |  # # # # # # #   #     #
          |# # # # # # # # # # #   #           #     #         #     #
   0.00 % |___________________________________________________________
           0                                                        60

Update backlog statistics:
- Number of dependencies with an update:  12 (of which 0 are direct)
- Mean update backlog of dependencies:    10 month(s) 4 day(s)
- Maximum update backlog of dependencies: 18 month(s) 4 day(s)
- Update backlog distribution per month:

  25.00 % |            #
          |            #
          |            #
          |            #
          |            #
          |            #
          |            #
          |  # #       # #     # #     #   # # #
          |  # #       # #     # #     #   # # #
          |  # #       # #     # #     #   # # #
   0.00 % |_____________________________________
           0                                  19

Reverse dependency statistics:
- Mean number of reverse dependencies:    1.42
- Maximum number of reverse dependencies: 4
- Reverse dependency count distribution:

  76.32 % |  #
          |  #
          |  #
          |  #
          |  #
          |  #
          |  #
          |  #
          |  #
          |  # # # _
   0.00 % |_________
           0       5
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].