Documentation
¶
Index ¶
- Constants
- func CreateDestinationPath(folderName string, clearOutput bool, v string)
- func DeepCopy[T any](value T) (*T, error)
- func GetUserConfirmation(msg, error string, terminate bool) bool
- func InRange(ranges []VersionRange, api GetVersion) bool
- func ReverseLookUp[T comparable, Y comparable](m map[T]Y) map[Y]T
- func ValidateMinimumVersion(minVersion string, api GetVersion) bool
- type GetVersion
- type VersionRange
Constants ¶
const (
VersionKey = "Version"
)
Variables ¶
This section is empty.
Functions ¶
func CreateDestinationPath ¶
CreateDestinationPath Handle osMkdir Errors
func DeepCopy ¶
DeepCopy creates a deep copy of the given value using JSON serialization, returning a pointer and an error.
func GetUserConfirmation ¶
GetUserConfirmation prompts user to confirm operation msg Message to prompt the user with validate returns true/false on success or terminates the process msg: prompt to display to the user asking for a response. error: error message to display if app should terminate terminate: when set to true will terminate the app user response is not valid.
func InRange ¶
func InRange(ranges []VersionRange, api GetVersion) bool
InRange returns true if the current grafana version in within all of the ranges specified. Falls if it is not.
func ReverseLookUp ¶
func ReverseLookUp[T comparable, Y comparable](m map[T]Y) map[Y]T
ReverseLookUp Creates a reverse look up map, where the values are the keys and the keys are the values.
func ValidateMinimumVersion ¶
func ValidateMinimumVersion(minVersion string, api GetVersion) bool
Types ¶
type GetVersion ¶
type VersionRange ¶
func (VersionRange) Validate ¶
func (v VersionRange) Validate() bool
Validate ensures that all version number start with a v, in order to be parsed correctly