Documentation ¶
Index ¶
- func CatalogUpdateRun(args []string)
- func CheckErrorFatal(e error)
- func CheckErrorNonFatal(e error, ok string) bool
- func ConfigureLogger()
- func DownloadCatalog(source *catalog.Source, outputPath string)
- func Execute()
- func GenerateCatalogFromLines(source *catalog.Source, outputPath string)
- func GetCatalogPaths() []string
- func GetPathsForPatterns(pathPatterns []string) []string
- func GetSourcePaths() []string
- func LoadConfiguration()
- func SearchCatalogs(catalogs []*LoadedCatalog, projectName string) *catalog.Entry
- func Version() string
- type LoadedCatalog
- type LoadedSource
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatalogUpdateRun ¶
func CatalogUpdateRun(args []string)
CatalogUpdateRun updates the specified catalogs based on their source configuration
func CheckErrorFatal ¶
func CheckErrorFatal(e error)
CheckErrorFatal logs a fatal error if error value is non-nil
func CheckErrorNonFatal ¶
CheckErrorNonFatal logs the error if error value is non-nil, returning true if there was an error
func ConfigureLogger ¶
func ConfigureLogger()
ConfigureLogger tweaks the configuration of the global logger based on parsed command line flags
func DownloadCatalog ¶
DownloadCatalog downloads the catalog from the location given in the source and writes it to the given path
func Execute ¶
func Execute()
Execute add all child commands to the root command and defaults flags appropriately (called from main.main())
func GenerateCatalogFromLines ¶
GenerateCatalogFromLines constructs a new catalog by gathering project information from lines and writes it to the given path
func GetCatalogPaths ¶
func GetCatalogPaths() []string
GetCatalogPaths returns paths to all files matching the catalog search pattern(s)
func GetPathsForPatterns ¶
GetPathsForPatterns returns the paths to any file matching the file path(s)
func GetSourcePaths ¶
func GetSourcePaths() []string
GetSourcePaths returns paths to all files matching the catalog source search pattern(s)
func LoadConfiguration ¶
func LoadConfiguration()
LoadConfiguration attempts to load in external configuration if possible, this function must be called in each commands execute function (after argument processing) because its behavior is influenced by the command line itself
func SearchCatalogs ¶
func SearchCatalogs(catalogs []*LoadedCatalog, projectName string) *catalog.Entry
SearchCatalogs looks for an Entry which matches the given name
Types ¶
type LoadedCatalog ¶
LoadedCatalog contains the parsed contents of a catalog file along with its path and stat info
func LoadCatalogFile ¶
func LoadCatalogFile(path string) (*LoadedCatalog, error)
LoadCatalogFile reads in the catalog for the given path
func LoadCatalogs ¶
func LoadCatalogs() []*LoadedCatalog
LoadCatalogs loads all catalogs specified in the config
type LoadedSource ¶
LoadedSource contains the parsed contents of a catalog source config file along with its path and stat info
func LoadSourceFile ¶
func LoadSourceFile(path string) (*LoadedSource, error)
LoadSourceFile reads in a catalog source config from the given file path
func LoadSources ¶
func LoadSources() []*LoadedSource
LoadSources loads in all catalog sources specified in the config
type TextFormatter ¶
type TextFormatter struct { }
TextFormatter defines a trivial log entry formatter