gitfmt

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateObjectID

func CreateObjectID(b []byte) (git.ObjectID, error)

CreateObjectID ...

func FormatCommit

func FormatCommit(commit *git.Commit) (string, error)

FormatCommit ...

func FormatHEAD

func FormatHEAD(h *git.HEAD) (string, error)

FormatHEAD ...

func FormatHyperMessage

func FormatHyperMessage(msg *git.HyperMessage) (string, error)

FormatHyperMessage ...

func FormatOperator

func FormatOperator(o *git.Operator) (string, error)

FormatOperator ...

func FormatProperties

func FormatProperties(tab *git.Properties) string

FormatProperties 将属性表格式化为文本形式

func FormatPropertiesWithSegment

func FormatPropertiesWithSegment(tab *git.Properties) string

FormatPropertiesWithSegment 将属性表格式化为文本形式(支持分段)

func FormatRef

func FormatRef(ref *git.Ref) (string, error)

FormatRef ...

func FormatTag

func FormatTag(tag *git.Tag) (string, error)

FormatTag ...

func FormatTree

func FormatTree(tree *git.Tree) ([]byte, error)

FormatTree ...

func ParseCommit

func ParseCommit(text string) (*git.Commit, error)

ParseCommit ...

func ParseHEAD

func ParseHEAD(text string) (*git.HEAD, error)

ParseHEAD ...

func ParseHyperMessage

func ParseHyperMessage(text string) (*git.HyperMessage, error)

ParseHyperMessage ...

func ParseObjectID

func ParseObjectID(text string) (git.ObjectID, error)

ParseObjectID ...

func ParseOperator

func ParseOperator(text string) (*git.Operator, error)

ParseOperator ...

func ParseProperties

func ParseProperties(text string, container *git.Properties) (*git.Properties, error)

ParseProperties 函数把参数 text 解析为属性表,存入dest中。

func ParseRef

func ParseRef(text string) (*git.Ref, error)

ParseRef ...

func ParseTag

func ParseTag(text string) (*git.Tag, error)

ParseTag ...

func ParseTree

func ParseTree(data []byte) (*git.Tree, error)

ParseTree ...

Types

type CommitBuilder

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

CommitBuilder ...

func (*CommitBuilder) Add

func (inst *CommitBuilder) Add(value *git.HyperHeader) error

Add ...

func (*CommitBuilder) AddExt

func (inst *CommitBuilder) AddExt(src *git.HyperHeader) error

AddExt ...

func (*CommitBuilder) Create

func (inst *CommitBuilder) Create() *git.Commit

Create ...

func (*CommitBuilder) SetAuthor

func (inst *CommitBuilder) SetAuthor(value *git.HyperHeader) error

SetAuthor ...

func (*CommitBuilder) SetCommitter

func (inst *CommitBuilder) SetCommitter(value *git.HyperHeader) error

SetCommitter ...

func (*CommitBuilder) SetContent

func (inst *CommitBuilder) SetContent(content string)

SetContent ...

func (*CommitBuilder) SetParent

func (inst *CommitBuilder) SetParent(value *git.HyperHeader) error

SetParent ...

func (*CommitBuilder) SetTree

func (inst *CommitBuilder) SetTree(value *git.HyperHeader) error

SetTree ...

type FileHolder added in v0.0.8

type FileHolder struct {
	File afs.Path

	io.ReadSeekCloser
}

FileHolder ...

Jump to

Keyboard shortcuts

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