utilities

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectoryContainsFile

func DirectoryContainsFile(directoryPath, fileName string) (bool, error)

func ExecuteTemplate

func ExecuteTemplate(fileName string, data interface{}) ([]byte, error)

func GitLatestTag

func GitLatestTag(modPath string) (string, error)

func GitUserName

func GitUserName(modPath string) (string, error)

func MakeRecommendation

func MakeRecommendation(note string)

MakeRecommendation propagates notes to the user about ways to improve the project for Open Source publishing.

func ReadTemplate

func ReadTemplate(fileName string) (*template.Template, error)

Types

type ModuleInfo

type ModuleInfo struct {
	PackagePathFilters []string
	// contains filtered or unexported fields
}

func ReadModule

func ReadModule(path string) (*ModuleInfo, error)

func (*ModuleInfo) AbsPathFromImportPath

func (Ω *ModuleInfo) AbsPathFromImportPath(impPath string) string

func (*ModuleInfo) Domain

func (Ω *ModuleInfo) Domain() string

func (*ModuleInfo) FilePath

func (Ω *ModuleInfo) FilePath() string

func (*ModuleInfo) Name

func (Ω *ModuleInfo) Name() string

func (*ModuleInfo) Packages

func (Ω *ModuleInfo) Packages() ([]Pkg, error)

Packages examines a module recursively for packages. If not run in a `go test` environment, it will ignore directories with `_test` suffix.

func (*ModuleInfo) RemotePath

func (Ω *ModuleInfo) RemotePath() string

func (*ModuleInfo) SubDomain

func (Ω *ModuleInfo) SubDomain() string

type Pkg

type Pkg struct {
	AstPkg     *ast.Package
	AbsPath    string
	ImportPath string
}

Jump to

Keyboard shortcuts

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