Documentation ¶
Index ¶
- func FileMatches(src string, file File) (bool, string)
- func GetLocalTomlPath(dotDir string) string
- func GetProjectDir() string
- func GetSystemTomlPath(dotDir string) string
- func GetUserTomlPath(dotDir string) string
- func IgnoreMatches(src string, file Ignore) (bool, string)
- type Config
- type File
- type Ignore
- type LocalDotsConfig
- type SystemDotsConfig
- type UserDotsConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileMatches ¶
FileMatches determines a particular file matches returned string can either be "folder" or "file". if bool is false, it can also be empty ("")
func GetLocalTomlPath ¶
GetLocalTomlPath gets location of local (.) config (local.dots.toml)
func GetProjectDir ¶
func GetProjectDir() string
GetProjectDir gets the root location of the current project, by recursively walking up directory tree until a globe.toml file is found. It stop searching after it reaches the user's home directory
func GetSystemTomlPath ¶
GetSystemTomlPath gets location of system (/) config (system.dots.toml)
func GetUserTomlPath ¶
GetUserTomlPath gets location of user (~) config (user.dots.toml)
Types ¶
type Config ¶
type Config struct { Project struct { License string `toml:"license"` Tags []string `toml:"tags"` } `toml:"project"` }
Config is the configuration file used to manage Globe. This is your `globe.toml` file
type File ¶
type File struct { File string `toml:"file"` Tags []string `toml:"tags"` Heuristic1 bool Heuristic2 bool Heuristic3 bool }
File represents a file entry in a `*.dots.toml` file
type Ignore ¶
type Ignore struct {
File string `toml:"file"`
}
Ignore represents an ignore entry in a `*.dots.toml` file
type LocalDotsConfig ¶
type LocalDotsConfig struct {
Files []File `toml:"files"`
}
LocalDotsConfig represents the `local.dots.toml` file
func GetLocalToml ¶
func GetLocalToml(dotDir string) LocalDotsConfig
GetLocalToml gets local (.) config
type SystemDotsConfig ¶
SystemDotsConfig represents the `system.dots.toml` file
func GetSystemToml ¶
func GetSystemToml(dotDir string) SystemDotsConfig
GetSystemToml gets system (/) config
type UserDotsConfig ¶
UserDotsConfig represents the `user.dots.toml` file