Documentation
¶
Index ¶
- Constants
- func DeleteContextFileIfEmpty() error
- func GetContextFilePath() string
- type Context
- type ContextFile
- func (cf *ContextFile) AddOrUpdateContext(name string, files []string)
- func (cf *ContextFile) DeleteContext(name string) bool
- func (cf *ContextFile) GetContext(name string) (*Context, bool)
- func (cf *ContextFile) GetContextNames() []string
- func (cf *ContextFile) IsEmpty() bool
- func (cf *ContextFile) Save() error
Constants ¶
View Source
const ContextFileName = ".contextfind.toml"
Variables ¶
This section is empty.
Functions ¶
func DeleteContextFileIfEmpty ¶
func DeleteContextFileIfEmpty() error
func GetContextFilePath ¶
func GetContextFilePath() string
Types ¶
type ContextFile ¶
type ContextFile struct {
Contexts []Context `toml:"contexts"`
}
func LoadContextFile ¶
func LoadContextFile() (*ContextFile, error)
func (*ContextFile) AddOrUpdateContext ¶
func (cf *ContextFile) AddOrUpdateContext(name string, files []string)
func (*ContextFile) DeleteContext ¶
func (cf *ContextFile) DeleteContext(name string) bool
func (*ContextFile) GetContext ¶
func (cf *ContextFile) GetContext(name string) (*Context, bool)
func (*ContextFile) GetContextNames ¶
func (cf *ContextFile) GetContextNames() []string
func (*ContextFile) IsEmpty ¶
func (cf *ContextFile) IsEmpty() bool
func (*ContextFile) Save ¶
func (cf *ContextFile) Save() error
Click to show internal directories.
Click to hide internal directories.