pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromDir

func FromDir(fs *token.FileSet, dir string, filter filterFunc) (*ast.Package, error)

FromDir returns package from the dir. If dir does not contains any files that pass filter lowercased dir name is used as a package name If filter is nil then NoTests filter is used

func FromImport

func FromImport(fs *token.FileSet, importPath string) (*ast.Package, error)

FromImport returns package with the given import path

func Name

func Name(importPath string) (string, error)

Name returns name of the package in given import path

func NoTests

func NoTests(fi os.FileInfo) bool

NoTests returns true for all files with .go suffix except _test.go

func Path

func Path(importPath string) (string, error)

Path returns package absolute path by given import path

Types

type Package

type Package struct {
	Name       string
	ImportPath string
	Path       string
}

Package contains package meta information

Jump to

Keyboard shortcuts

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