tools

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: BSD-3-Clause-LBNL Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VersionKey = "Version"
)

Variables

This section is empty.

Functions

func CreateDestinationPath added in v0.5.2

func CreateDestinationPath(folderName string, clearOutput bool, v string)

CreateDestinationPath Handle osMkdir Errors

func DeepCopy added in v0.4.5

func DeepCopy[T any](value T) (*T, error)

DeepCopy creates a deep copy of the given value using JSON serialization, returning a pointer and an error.

func GetUserConfirmation added in v0.4.5

func GetUserConfirmation(msg, error string, terminate bool) bool

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 added in v0.6.0

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 ValidateMinimumVersion added in v0.6.0

func ValidateMinimumVersion(minVersion string, api GetVersion) bool

Types

type GetVersion added in v0.6.0

type GetVersion interface {
	GetServerInfo() map[string]any
}

type VersionRange added in v0.6.0

type VersionRange struct {
	MinVersion string
	MaxVersion string
}

func (VersionRange) Validate added in v0.6.0

func (v VersionRange) Validate() bool

Validate ensures that all version number start with a v, in order to be parsed correctly

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL