Documentation
¶
Index ¶
- Constants
- func CachePath(path ...string) string
- func FileCopy(source string, dest string) error
- func GetOwnerMode(fInfo os.FileInfo) (os.FileMode, int, int)
- func IsDebianOrDerivative(osString string) bool
- func IsDir(name string) bool
- func IsRHELOrDerivative(osString string) bool
- func IsSUSEOrDerivative(osString string) bool
- func IsUnixSocket(path string) bool
- func LogPath(path ...string) string
- func RenderTable(w io.Writer, format string, header []string, data [][]string, raw any) error
- func RunPath(path ...string) string
- func VarPath(path ...string) string
- type Column
Constants ¶
View Source
const ( TableFormatCSV = "csv" TableFormatJSON = "json" TableFormatTable = "table" TableFormatYAML = "yaml" TableFormatCompact = "compact" )
Table list format.
View Source
const ( // TableOptionNoHeader hides the table header when possible. TableOptionNoHeader = "noheader" // TableOptionHeader adds header to csv. TableOptionHeader = "header" )
Variables ¶
This section is empty.
Functions ¶
func CachePath ¶
CachePath returns the directory that migration manager should use for caching assets. If MIGRATION_MANAGER_DIR is set, this path is $MIGRATION_MANAGER_DIR/cache, otherwise it is /var/cache/migration-manager.
func IsDebianOrDerivative ¶
func IsRHELOrDerivative ¶
func IsSUSEOrDerivative ¶
func IsUnixSocket ¶
IsUnixSocket returns true if the given path is either a Unix socket or a symbolic link pointing at a Unix socket.
func LogPath ¶
LogPath returns the directory that migration manager should put logs under. If MIGRATION_MANAGER_DIR is set, this path is $MIGRATION_MANAGER_DIR/logs, otherwise it is /var/log.
func RenderTable ¶
RenderTable renders tabular data in various formats.
Types ¶
Click to show internal directories.
Click to hide internal directories.