npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gopackage-map

v0.1.0

Published

A powerful tool to show the package relationship between or inside your Golang project services in a modern visualization way

Downloads

7

Readme

GoPackageMap Tool

A powerful tool to show the package relationship between or inside your Golang project services in a modern visualization way.

Get Started

Prerequisites

Notice: You only have to do this step once, feel free to skip if you already have Node an Go installed and running.

Install Node

Make sure you have NodeJS installed.

Install Go

Make sure you have installed Go and be able to access go command to your local terminal.

Install GoMap

run npm install gomap -g to install the gomap tool globally.

Usage

After install the gomap globally, you should be able to access the gomap command in your terminal.

List all possible commands

Whenever you have problems or forget about a command, please do remember this one command will prints all available commands for you.

gomap

Currently, gomap has two simple functions, gomap list and gomap graph.

gomap graph: Visualize the relationship of go project's packages in a graph.

Come into your go project file path, try to run

gomap graph ./your_go_service_folder

Then gomap graph would do two things,

  • First, scan all of the go files under the folder path which your input and generate the packages relationship data.
  • Automatically open your default browser to generalize a visualization result about the relationship of your go dependencies.

You can also get severals services' package relationship by providing multiply path.

For example,

gomap graph ./service_a ./service_b ./service_c

gomap list: Print the dependency relation in the console

The Same usage with gomap graph, just run the next command and you can get the result directly in your console.

gomap list ./your_go_services_folder

Options

You can also add some options when you run the gomap command:

gomap graph ./your_go_service --no_system_libs --no_vendors_libs

The meaning of these options are as follow:

--no_system_libs: Ignore the system libs in your project files;

--no_vendor_libs: Ignore the vendors libs

--no_system_vendors: Ignore both system libs and vendors libs

Visualiziton Explain

The visualizing graph aims to help you get better understand of your go project dependency relationship through these following aspects:

Relationship Type

There are two kind of relationship for each packages:

  • Depends on: means following packages are imported by current pakcage
  • Depended By: means current packages is imported by these following packages.

Folding and Unfolding Service

All services are in the folding mode until you click the button of left legend to unfold the collection.

Two packages will only show the connection line when they are all in the unfolding mode.

Search Specific Service

The serach package container will help you find the specific package you are looking for. There would be a search hint of the possiable package you want to search with you typing.

Show the Documentation

Ater click each package, you will get a list of the current package Depennds on and Depended By info in the bottom of page.

You can switch to the other package just by clicking the package name.

Zoom in and Zoom out the Specific Area

Zoom in and zoom out help you control the visual pan and get a better vision.

Demo

  • After runninng gomap graph :

Demo

  • After running gomap list : go list demo

What's next?

Join #gomap-early-birds channel to discuss questions and ideas with other users.

Let's try utilizing this tool to make our daily work easier and more enjoyable, Cheers!