commonCLI

package module
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 11 Imported by: 5

README

akamai-cli-common

Common functions used in various akamai CLI

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFlags

func CreateFlags() []cli.Flag

func CreateNewApp

func CreateNewApp(appShortName, usage, version string) *cli.App

func DeleteSlicefromSlice

func DeleteSlicefromSlice(slice, delete []int) []int

DeleteSlicefromSlice deletes one slice from another and removes duplicate objects

func ErrorCheck

func ErrorCheck(e error)

ErrorCheck default error check

func HomeDir

func HomeDir() string

HomeDir set default config location

func IsStringInSlice

func IsStringInSlice(a string, list []string) bool

IsStringInSlice returns TRUE is slice contains string and false if not

func OutputJSON

func OutputJSON(input interface{})

OutputJSON displays output of query for alerts in JSON format

func PrintJSON

func PrintJSON(str string)

PrintJSON pretty print JSON string

func RemoveIntDuplicates

func RemoveIntDuplicates(elements []int) []int

RemoveIntDuplicates removes duplicated elements from int array

func RemoveStringDuplicates

func RemoveStringDuplicates(str []string) []string

RemoveStringDuplicates removes duplicated elements from strings array

func SetIntID

func SetIntID(c *cli.Context, errMessage string) string

SetIntID value and verify that it is int

func SetStringId

func SetStringId(c *cli.Context, errMessage string) string

SetStringId value

func StringToIntArr

func StringToIntArr(str string) (intArr []int)

StringToIntArr transform string of comma seperated words to array of ints

func StringToStringsArr

func StringToStringsArr(str string) (strArr []string)

StringToStringsArr transform string of comma seperated words to array of strings

func StringsSlicesDifference

func StringsSlicesDifference(slice1 []string, slice2 []string) []string

StringsSlicesDifference give you diff between 2 strings slices

func VerifyArgumentByName

func VerifyArgumentByName(c *cli.Context, argName string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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