render

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

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

func NewRenderer

func NewRenderer(a *theme.All) *Renderer

func (*Renderer) BlockSize

func (rd *Renderer) BlockSize(toRender string) string

func (*Renderer) ByExt

func (rd *Renderer) ByExt(toRender string) (s theme.Style, found bool)

ByExt returns the colorized string by the file extension if the file has no extension it returns an empty string

func (*Renderer) ByName

func (rd *Renderer) ByName(toRender string) (s theme.Style, found bool)

func (*Renderer) Char

func (rd *Renderer) Char() theme.Style

func (*Renderer) Charset

func (rd *Renderer) Charset(toRender string) string

func (*Renderer) Checksum

func (rd *Renderer) Checksum(toRender string) string

func (*Renderer) Colorend

func (rd *Renderer) Colorend() string

func (*Renderer) Device

func (rd *Renderer) Device() theme.Style

func (*Renderer) Dir

func (rd *Renderer) Dir(name string, empty bool) theme.Style

func (*Renderer) DirPrompt

func (rd *Renderer) DirPrompt(dir string) string

func (*Renderer) Executable

func (rd *Renderer) Executable() theme.Style

func (*Renderer) File

func (rd *Renderer) File() theme.Style

func (*Renderer) FileMode

func (rd *Renderer) FileMode(toRender string) string

FileMode - Regular file. b Block special file. c Character special file. d Directory. l Symbolic link. p FIFO. s Socket. w Whiteout.

go std fs.FileMode

ModeDir        FileMode = 1 << (32 - 1 - iota) // d: is a directory
ModeAppend                                     // a: append-only
ModeExclusive                                  // l: exclusive use
ModeTemporary                                  // T: temporary file; Plan 9 only
ModeSymlink                                    // L: symbolic link
ModeDevice                                     // D: device file
ModeNamedPipe                                  // p: named pipe (FIFO)
ModeSocket                                     // S: Unix domain socket
ModeSetuid                                     // u: setuid
ModeSetgid                                     // g: setgid
ModeCharDevice                                 // c: Unix character device, when ModeDevice is set
ModeSticky                                     // t: sticky
ModeIrregular                                  // ?: non-regular file; nothing else is known about this file

func (*Renderer) GitAdded

func (rd *Renderer) GitAdded(name string) string

func (*Renderer) GitCopied

func (rd *Renderer) GitCopied(name string) string

func (*Renderer) GitDeleted

func (rd *Renderer) GitDeleted(name string) string

func (*Renderer) GitIgnored

func (rd *Renderer) GitIgnored(name string) string

func (*Renderer) GitModified

func (rd *Renderer) GitModified(name string) string

func (*Renderer) GitRenamed

func (rd *Renderer) GitRenamed(name string) string

func (*Renderer) GitRepoBranch

func (rd *Renderer) GitRepoBranch(branch string) string

func (*Renderer) GitRepoStatus

func (rd *Renderer) GitRepoStatus(status git.RepoStatus) string

func (*Renderer) GitTypeChanged

func (rd *Renderer) GitTypeChanged(s string) string

func (*Renderer) GitUnmodified

func (rd *Renderer) GitUnmodified(name string) string

func (*Renderer) GitUntracked

func (rd *Renderer) GitUntracked(name string) string

func (*Renderer) GitUpdatedButUnmerged

func (rd *Renderer) GitUpdatedButUnmerged(s string) string

func (*Renderer) Group

func (rd *Renderer) Group(toRender string) string

func (*Renderer) HiddenFile

func (rd *Renderer) HiddenFile() theme.Style

func (*Renderer) Inode

func (rd *Renderer) Inode(inode string) string
func (rd *Renderer) Link(toRender string) string

func (*Renderer) Mime

func (rd *Renderer) Mime(toRender string) string

func (*Renderer) Mounts

func (rd *Renderer) Mounts(mounts string) string

func (*Renderer) OctalPerm

func (rd *Renderer) OctalPerm(octal string) string

func (*Renderer) Owner

func (rd *Renderer) Owner(toRender string) string

func (*Renderer) Pipe

func (rd *Renderer) Pipe() theme.Style

func (*Renderer) RTime

func (rd *Renderer) RTime(now, modTime time.Time) string

func (*Renderer) SetTheme

func (rd *Renderer) SetTheme(theme *theme.All) *Renderer

func (*Renderer) Size

func (rd *Renderer) Size(toRender, unit string) string

func (*Renderer) Socket

func (rd *Renderer) Socket() theme.Style
func (rd *Renderer) Symlink() theme.Style

func (*Renderer) SymlinkArrow

func (rd *Renderer) SymlinkArrow() theme.Style

func (*Renderer) SymlinkBroken

func (rd *Renderer) SymlinkBroken() theme.Style

func (*Renderer) SymlinkDereference

func (rd *Renderer) SymlinkDereference() theme.Style

func (*Renderer) Time

func (rd *Renderer) Time(toRender string) string

Jump to

Keyboard shortcuts

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