filetree

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GatherFiles

func GatherFiles(opts *FileGatherOptions) ([]File, *FileNode, error)

func GenerateFileTree

func GenerateFileTree(node *FileNode, indent string, isLast bool) string

Types

type File

type File struct {
	Path string
	Data []byte
	Type string
}

type FileGatherOptions

type FileGatherOptions struct {
	IncludeMatcher pm.PathMatcher
	ExcludeMatcher pm.PathMatcher
	PathScopes     []string
}

type FileNode

type FileNode struct {
	Name     string
	IsDir    bool
	Children []*FileNode
}

type Language

type Language struct {
	Type               string   `yaml:"type"`
	TmScope            string   `yaml:"tm_scope,omitempty"`
	AceMode            string   `yaml:"ace_mode"`
	CodemirrorMode     string   `yaml:"codemirror_mode,omitempty"`
	CodemirrorMimeType string   `yaml:"codemirror_mime_type,omitempty"`
	Color              string   `yaml:"color,omitempty"`
	Aliases            []string `yaml:"aliases,omitempty"`
	Extensions         []string `yaml:"extensions"`
	Filenames          []string `yaml:"filenames,omitempty"`
	Interpreters       []string `yaml:"interpreters,omitempty"`
	Group              string   `yaml:"group,omitempty"`
	LanguageID         int64    `yaml:"language_id"`
}

Jump to

Keyboard shortcuts

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