Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildOptions ¶
type BuildOptions struct {
Include []string // 包含パターン(空なら全ファイル)
Exclude []string // 除外パターン
SortDesc bool // true なら同一種別内を降順に並べる
}
BuildOptions はツリー構築のオプション
type TreeItem ¶
type TreeItem struct {
Name string `json:"name"`
Path string `json:"path"`
IsDir bool `json:"isDir"`
Children []*TreeItem `json:"children,omitempty"`
Worktrees []string `json:"worktrees,omitempty"`
ModifiedAtMs int64 `json:"modifiedAtMs,omitempty"`
Size int64 `json:"size,omitempty"`
}
TreeItem はツリーに表示される項目を表す
func BuildFromGitFiles ¶
func BuildFromGitFiles(rootName string, files []string, opts BuildOptions) *TreeItem
BuildFromGitFiles は git ls-files の結果からツリーを構築する
func MergeTreeItemsWithOptions ¶
func MergeTreeItemsWithOptions(base *TreeItem, other *TreeItem, otherWorktree string, opts BuildOptions) *TreeItem
MergeTreeItemsWithOptions は2つのツリーを統合(ユニオン)し、指定された並び順で整列する。
Click to show internal directories.
Click to hide internal directories.