todo

package
v0.0.0-...-fe1557a Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputTemplate            = "%s [%d] >>> %s\n"
	OutputResultCountTemplate = "\n\nFound %d outstanding TODOs!\n"
)

Variables

This section is empty.

Functions

func GetCommitObject

func GetCommitObject(path string) (*object.Commit, error)

GetCommitObject returns the commit object at the current path

func LookupGitUser

func LookupGitUser() string

LookupGitUser lookups git user with the git command

func PrintSearchResults

func PrintSearchResults(searchResults SearchResults)

PrintSearchResults will print the given searchResults to stdout

Types

type SearchResult

type SearchResult struct {
	// contains filtered or unexported fields
}

SearchResult is a struct to store search result

func SearchCurrentCommit

func SearchCurrentCommit(path string, commit *object.Commit, author string, searchTerm string) ([]SearchResult, error)

SearchCurrentCommit searches for matching search terms at the current commit

func SearchFile

func SearchFile(file string, pat []byte) []SearchResult

Search for given pattern on the file

type SearchResults

type SearchResults map[string][]SearchResult

SearchResults is a map to store multiple SearchResult where the key is the file name

func Search(root string, commit *object.Commit, author string) SearchResults

Search will walk through all directories starting at the given path and will find all files that match the search criteria

Jump to

Keyboard shortcuts

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