gopkgs

package module
v2.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 11 Imported by: 2

Documentation

Overview

Package gopkgs is a utility to get list of golang packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List(opts Options) (map[string]Pkg, error)

List packages on workDir. workDir is required for module mode. If the workDir is not under module, then it will fallback to GOPATH mode.

Types

type Options

type Options struct {
	WorkDir  string // Will return importable package under WorkDir. Any vendor dependencies outside the WorkDir will be ignored.
	NoVendor bool   // Will not retrieve vendor dependencies, except inside WorkDir (if specified)
}

Options for retrieve packages.

type Pkg

type Pkg struct {
	Dir        string // directory containing package sources
	ImportPath string // import path of package in dir
	Name       string // package name
	Standard   bool   // is this package part of the standard Go library?
}

Pkg hold the information of the package.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL