shared

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoContainer no docker container error.
	ErrNoContainer = errors.New("no docker container")
	// ErrNoImage no image error.
	ErrNoImage = errors.New("no image")
	// ErrNoVolume no volume error.
	ErrNoVolume = errors.New("no volume")
	// ErrNoNetwork no network error.
	ErrNoNetwork = errors.New("no network")
	// ErrDockerConnect cannot connect to docker engine error.
	ErrDockerConnect = errors.New("unable to connect to `docker`")
	// ErrSmallTermWindowSize cannot run doko because of a small terminal window size
	ErrSmallTermWindowSize = errors.New("because of a small terminal window size cannot run `doko`")
)

Functions

func CutNewline

func CutNewline(i string) string

CutNewline -> cut new line.

func DateNow

func DateNow() string

DateNow -> return date time.

func GetEnv

func GetEnv(env string) string

GetEnv -> get os environment.

func IsTermWindowSizeBiggerThanZero

func IsTermWindowSizeBiggerThanZero() bool

func ParseDateToString

func ParseDateToString(unixtime int64) string

ParseDateToString -> parse date to string.

func ParseLabels

func ParseLabels(labels map[string]string) string

ParseLabels -> parse image labels.

func ParsePortToString

func ParsePortToString(ports []types.Port) string

ParsePortToString -> parse port to string.

func ParseRepoTag

func ParseRepoTag(repoTag string) (string, string)

ParseRepoTag -> parse image repo and tag.

func ParseSizeToString

func ParseSizeToString(size int64) string

ParseSizeToString -> parse size to string.

func SortKeys

func SortKeys(keys []string) []string

SortKeys -> sort keys.

func StructToJSON

func StructToJSON(i interface{}) string

StructToJSON -> convert any struct to json.

Types

This section is empty.

Jump to

Keyboard shortcuts

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