formatter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerStatus

func ContainerStatus(ctx context.Context, c containerd.Container) string

func Ellipsis

func Ellipsis(str string, maxDisplayWidth int) string

func FormatLabels added in v0.22.1

func FormatLabels(labelMap map[string]string) string

func FormatPorts

func FormatPorts(labelMap map[string]string) string

func InspectContainerCommand

func InspectContainerCommand(spec *oci.Spec, trunc, quote bool) string

func InspectContainerCommandTrunc

func InspectContainerCommandTrunc(spec *oci.Spec) string

func TimeSinceInHuman

func TimeSinceInHuman(since time.Time) string

func ToJSON added in v1.1.0

func ToJSON(i interface{}, prefix string, indentation string) (string, error)

ToJSON return a string with the JSON representation of the interface{} https://github.com/docker/compose/blob/v2/cmd/formatter/json.go#L31C4-L39

Types

This section is empty.

Jump to

Keyboard shortcuts

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