v1.9.0 Latest Latest

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 7 Imported by: 0




View Source
const (
	// RepoHeader is the header for repos.
	RepoHeader = "NAME\tCREATED\tSIZE (MASTER)\t\n"
	// RepoAuthHeader is the header for repos with auth information attached.
	// CommitHeader is the header for commits.
	// BranchHeader is the header for branches.
	BranchHeader = "BRANCH\tHEAD\t\n"
	// FileHeader is the header for files.
	FileHeader = "NAME\tTYPE\tSIZE\t\n"
	// FileHeaderWithCommit is the header for files that includes a commit field.
	FileHeaderWithCommit = "COMMIT\tNAME\tTYPE\tCOMMITTED\tSIZE\t\n"


This section is empty.


func CompactPrintBranch added in v1.8.6

func CompactPrintBranch(b *pfs.Branch) string

CompactPrintBranch renders 'b' as a compact string, e.g. "myrepo@master:/my/file"

func CompactPrintCommit added in v1.8.6

func CompactPrintCommit(c *pfs.Commit) string

CompactPrintCommit renders 'c' as a compact string, e.g. "myrepo@123abc:/my/file"

func CompactPrintFile added in v1.8.6

func CompactPrintFile(f *pfs.File) string

CompactPrintFile renders 'f' as a compact string, e.g. "myrepo@master:/my/file"

func PrintBranch added in v1.3.19

func PrintBranch(w io.Writer, branchInfo *pfs.BranchInfo)

PrintBranch pretty-prints a Branch.

func PrintCommitInfo

func PrintCommitInfo(w io.Writer, commitInfo *pfs.CommitInfo, fullTimestamps bool)

PrintCommitInfo pretty-prints commit info.

func PrintDetailedCommitInfo added in v1.1.0

func PrintDetailedCommitInfo(commitInfo *PrintableCommitInfo) error

PrintDetailedCommitInfo pretty-prints detailed commit info.

func PrintDetailedFileInfo added in v1.1.0

func PrintDetailedFileInfo(fileInfo *pfs.FileInfo) error

PrintDetailedFileInfo pretty-prints detailed file info.

func PrintDetailedRepoInfo added in v1.1.0

func PrintDetailedRepoInfo(repoInfo *PrintableRepoInfo) error

PrintDetailedRepoInfo pretty-prints detailed repo info.

func PrintFileInfo

func PrintFileInfo(w io.Writer, fileInfo *pfs.FileInfo, fullTimestamps, withCommit bool)

PrintFileInfo pretty-prints file info. If recurse is false and directory size is 0, display "-" instead If fast is true and file size is 0, display "-" instead

func PrintRepoInfo

func PrintRepoInfo(w io.Writer, repoInfo *pfs.RepoInfo, fullTimestamps bool)

PrintRepoInfo pretty-prints repo info.


type PrintableCommitInfo added in v1.8.7

type PrintableCommitInfo struct {
	FullTimestamps bool

PrintableCommitInfo is a wrapper around CommitInfo containing any formatting options used within the template to conditionally print information.

func NewPrintableCommitInfo added in v1.8.7

func NewPrintableCommitInfo(ci *pfs.CommitInfo) *PrintableCommitInfo

NewPrintableCommitInfo constructs a PrintableCommitInfo from just a CommitInfo.

type PrintableRepoInfo added in v1.8.7

type PrintableRepoInfo struct {
	FullTimestamps bool

PrintableRepoInfo is a wrapper around RepoInfo containing any formatting options used within the template to conditionally print information.

func NewPrintableRepoInfo added in v1.8.7

func NewPrintableRepoInfo(ri *pfs.RepoInfo) *PrintableRepoInfo

NewPrintableRepoInfo constructs a PrintableRepoInfo from just a RepoInfo.

Jump to

Keyboard shortcuts

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