Documentation ¶
Index ¶
- Constants
- func CompactPrintBranch(b *pfs.Branch) string
- func CompactPrintCommit(c *pfs.Commit) string
- func CompactPrintFile(f *pfs.File) string
- func PrintBranch(w io.Writer, branchInfo *pfs.BranchInfo)
- func PrintCommitInfo(w io.Writer, commitInfo *pfs.CommitInfo, fullTimestamps bool)
- func PrintDetailedBranchInfo(branchInfo *pfs.BranchInfo) error
- func PrintDetailedCommitInfo(commitInfo *PrintableCommitInfo) error
- func PrintDetailedFileInfo(fileInfo *pfs.FileInfo) error
- func PrintDetailedRepoInfo(repoInfo *PrintableRepoInfo) error
- func PrintDiffFileInfo(w io.Writer, added bool, fileInfo *pfs.FileInfo, fullTimestamps bool)
- func PrintFileInfo(w io.Writer, fileInfo *pfs.FileInfo, fullTimestamps, withCommit bool)
- func PrintRepoInfo(w io.Writer, repoInfo *pfs.RepoInfo, fullTimestamps bool)
- type PrintableCommitInfo
- type PrintableRepoInfo
Constants ¶
const ( // RepoHeader is the header for repos. RepoHeader = "NAME\tCREATED\tSIZE (MASTER)\tDESCRIPTION\t\n" // RepoAuthHeader is the header for repos with auth information attached. RepoAuthHeader = "NAME\tCREATED\tSIZE (MASTER)\tACCESS LEVEL\t\n" // CommitHeader is the header for commits. CommitHeader = "REPO\tBRANCH\tCOMMIT\tFINISHED\tSIZE\tPROGRESS\tDESCRIPTION\n" // 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" // DiffFileHeader is the header for files produced by diff file. DiffFileHeader = "OP\t" + FileHeader )
Variables ¶
This section is empty.
Functions ¶
func CompactPrintBranch ¶ added in v1.8.6
CompactPrintBranch renders 'b' as a compact string, e.g. "myrepo@master:/my/file"
func CompactPrintCommit ¶ added in v1.8.6
CompactPrintCommit renders 'c' as a compact string, e.g. "myrepo@123abc:/my/file"
func CompactPrintFile ¶ added in v1.8.6
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 PrintDetailedBranchInfo ¶ added in v1.9.9
func PrintDetailedBranchInfo(branchInfo *pfs.BranchInfo) error
PrintDetailedBranchInfo pretty-prints detailed branch info.
func PrintDetailedCommitInfo ¶
func PrintDetailedCommitInfo(commitInfo *PrintableCommitInfo) error
PrintDetailedCommitInfo pretty-prints detailed commit info.
func PrintDetailedFileInfo ¶
PrintDetailedFileInfo pretty-prints detailed file info.
func PrintDetailedRepoInfo ¶
func PrintDetailedRepoInfo(repoInfo *PrintableRepoInfo) error
PrintDetailedRepoInfo pretty-prints detailed repo info.
func PrintDiffFileInfo ¶ added in v1.8.8
PrintDiffFileInfo pretty-prints a file info from diff file.
func PrintFileInfo ¶
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
Types ¶
type PrintableCommitInfo ¶ added in v1.8.7
type PrintableCommitInfo struct { *pfs.CommitInfo 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
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.