GithubHelp home page GithubHelp logo

lhhong / gopkgs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uudashr/gopkgs

0.0 1.0 0.0 82 KB

gopkgs - Tool to get list available Go packages

License: MIT License

Makefile 7.12% Go 92.88%

gopkgs's Introduction

Build Status GoDoc

gopkgs

Gopkgs is tools that provide list of available Go packages that can be imported.

This is an alternative to go list all, just faster.

Installation

$ go get -u github.com/uudashr/gopkgs/cmd/gopkgs

Usage

$ gopkgs -help
  -format string
    	custom output format (default "{{.ImportPath}}")
  -help
    	show this message
  -no-vendor
    	exclude vendor dependencies except under workDir (if specified)
  -workDir string
    	importable packages only for workDir


Use -format to custom the output using template syntax. The struct being passed to template is:
    type Pkg struct {
        Dir        string // directory containing package sources
        ImportPath string // import path of package in dir
        Name       string // package name
    }

Use -workDir={path} to speed up the package search. This will ignore any vendor package outside the workDir.

Example

Get package name along with the import path.

$ gopkgs -format "{{.Name}};{{.ImportPath}}"
testing;github.com/mattes/migrate/source/testing
http;github.com/stretchr/testify/http
ql;github.com/mattes/migrate/database/ql
pkgtree;github.com/golang/dep/internal/gps/pkgtree
sqlite3;github.com/mattes/migrate/database/sqlite3
gps;github.com/golang/dep/internal/gps
spanner;github.com/mattes/migrate/database/spanner
dep;github.com/golang/dep
shortener;github.com/uudashr/shortener
bindata;github.com/mattes/migrate/source/go-bindata
postgres;github.com/mattes/migrate/database/postgres
test;github.com/vektra/mockery/mockery/fixtures
awss3;github.com/mattes/migrate/source/aws-s3

Tips

Use -workDir={path} flag, it will speed up the package search by ignoring the exernal vendor.

Related Project

This is based on https://github.com/haya14busa/gopkgs but taking slightly different path by simplifying its implementation.

gopkgs's People

Contributors

lhhong avatar rarrarrarr avatar tkivisik avatar uudashr avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.