Documentation ¶
Index ¶
- func AppendIfNotPresent(x []string, value string) []string
- func FindRepoRoot(dir string) (string, error)
- func GetEditorTool() (string, error)
- func GetRepoRoot() (string, error)
- func JoinWorkingDirectory(dir string) (string, error)
- func UUIDVersion4(u [16]byte) string
- func WriteConfig(path string, config Config) (err error)
- type Boots
- type Config
- type ModuleConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfNotPresent ¶
AppendIfNotPresent appends value to the slice x if not present. The slice must be sorted in ascending order.
func FindRepoRoot ¶
FindRepoRoot returns the absolute path to the root directory of the repository, or error. If the dir passed in is a relative path it will be used relative to the current working directory of the executable.
func GetEditorTool ¶
GetEditorTool returns the editor tool to use for interactive file edits.
func GetRepoRoot ¶
GetRepoRoot uses the current working directory to find the repository root.
func JoinWorkingDirectory ¶
JoinWorkingDirectory will return an absolute file system path of the passed in dir path with the current working directory.
func UUIDVersion4 ¶
UUIDVersion4 takes an array of 16 (random) bytes and converts it to a UUIDv4 value.
func WriteConfig ¶
WriteConfig writes the tooling configuration to the given path.
Types ¶
type Boots ¶
type Boots struct { // Directories to skip when iterating. SkipDirs []string // contains filtered or unexported fields }
Boots was made for walking the file tree searching for modules.
type Config ¶
type Config struct { Modules map[string]ModuleConfig `toml:"modules,omitempty"` Dependencies map[string]string `toml:"dependencies,omitempty"` }
Config is a configuration file for describing how modules and dependencies are managed.
func LoadConfig ¶
LoadConfig loads the tooling configuration file located in the directory path.
type ModuleConfig ¶
type ModuleConfig struct { // Indicates that the given module should not be tagged (released) NoTag bool `toml:"no_tag,omitempty"` // The semver pre-release string for the module PreRelease string `toml:"pre_release,omitempty"` // The package alternative location relative to the module where the go_module_metadata.go should be written. // By default this file is written in the location of the module root where the `go.mod` is located. MetadataPackage string `toml:"metadata_package,omitempty"` }
ModuleConfig is the configuration for the repository module