utils

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package utils is intended to contain helper functions used by other iter8ctl packages.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompletePath

func CompletePath(prefix string, suffix string) string

CompletePath is a helper function for converting file paths, specified relative to the caller of this function, into absolute ones. CompletePath is useful in tests and enables deriving the absolute path of experiment YAML files.

Example
// Tests for the experiment package use code similar to the following snippet.
filePath := CompletePath("../testdata", "experiment2.yaml")
_, _ = ioutil.ReadFile(filePath)
Output:

func IsJSONObject added in v0.1.33

func IsJSONObject(str string) bool

IsJSON checks if the given string is a valid JSON object (schemaless check)

Types

This section is empty.

Jump to

Keyboard shortcuts

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