pkgutil

package
v0.0.0-...-b75375f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2014 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package pkgutil contains some small utilities for working with go packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filenames

func Filenames(p *build.Package) []string

Filenames returns all filenames referenced by the package as relative paths to the package directory.

func IsPackage

func IsPackage(dir string) bool

IsPackage returns wheter the given directory is a Go package.

func LineCount

func LineCount(p *build.Package) (int, error)

LineCount returns the number of lines of code in the given package.

func ListPackages

func ListPackages(dir string) ([]string, error)

ListPackages returns a list of packages found under the given directory (including itself, if it's a package).

func SplitQualifiedName

func SplitQualifiedName(qname string) (pkg string, name string)

SplitQualifiedName splits a qualified name into the package and the local name inside the package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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