utils

package
v0.0.0-...-921adc7 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromBytes

func FromBytes(i interface{}, data []byte) error

func GetFileDir

func GetFileDir(path string) string

func GetFileExtension

func GetFileExtension(path string) string

func GetFileName

func GetFileName(path string) string

func GetFileNameWithoutExtension

func GetFileNameWithoutExtension(path string) string

func GetOrSetHomePath

func GetOrSetHomePath() (string, error)

GetOrSetHomePath returns the existing value for env 'OSSICONES_SRC_HOME' if present. Otherwise, it sets and returns the given value.

func HandleError

func HandleError(err error)

func IsContain

func IsContain(list []string, key string) bool

func IsRunning

func IsRunning() (bool, error)

IsRunning checks if the same process is already running. It returns error, if failed to get list of processes because of the unsupported OS.

func RemoveElement

func RemoveElement(slice []string, key string) []string

func ToBytes

func ToBytes(i interface{}) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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