util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 60

Documentation

Overview

Package util implements different utilities

Package util implements different utilities

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintError

func PrintError(message string)

PrintError prints 'message' with red color text message: Message to be printed

func PrintIfError

func PrintIfError(err error)

PrintIfError print the error message if the provided err has valid error value err: Optinal. The error to be printed

func PrintInfo

func PrintInfo(message string)

PrintInfo prints a 'message' with cSkyyblue color text message: Message to be printed

func PrintSuccess

func PrintSuccess(message string)

PrintSuccess prints 'message' with green color text message: Message to be printed

func PrintYAML

func PrintYAML(obj interface{})

PrintYAML takes input object, marshal it using YAML format and prints it into standard output obj: Mandatory. Reference to the object to be printed

Types

type Version

type Version struct {
	Version       string
	Platform      string
	Commit        string
	Date          string
	GolangVersion string
}

Version defines the structure containns all information to be printed when 'version' command is requested.

func GetVersion

func GetVersion() Version

GetVersion returns the version information Returns the version inforamtion

Jump to

Keyboard shortcuts

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