govend: Index | Files | Directories

package imports

import ""

Package imports scans for Go package import paths.


Package Files

format.go imports.go parse.go path.go scan.go valid.go

func Format Uses

func Format(pkgs []string, format string) ([]byte, error)

Format takes a slice of packages and formats it.

func Parse Uses

func Parse(file string) ([]string, error)

Parse takes a Go file path and parses its import paths.

func ParseOptions Uses

func ParseOptions(skipTestFiles, skipFilters bool) []ScanOptions

ParseOptions converts cli flag inputs to ScanOptions.

func Path Uses

func Path(dir string) (string, error)

Path returns the import path of a package directory. It does so via $GOPATH.

func Scan Uses

func Scan(path string, options ...ScanOptions) ([]string, error)

Scan takes a directory and scans it for import dependencies.

func Valid Uses

func Valid(path string) bool

Valid takes an import package path and determines if its valid.

type ScanOptions Uses

type ScanOptions int

ScanOptions represents available scan options.

const (
    // SinglePackage only scans a single package
    SinglePackage ScanOptions = iota

    // SkipTestFiles does not scan files that end in "_test.go".

    // SkipFilters returns the raw unfiltered list of scanned packages.


filtersPackage filters provides filters for Go package import paths.

Package imports imports 16 packages (graph) and is imported by 23 packages. Updated 2016-10-01. Refresh now. Tools for package owners.