format

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

Functions

func IsShortSyntaxExpressible added in v2.17.0

func IsShortSyntaxExpressible(v types.ServiceVolumeConfig) bool

IsShortSyntaxExpressible tells whether the short syntax can say what the volume says, so that a volume which isn't can only be written in the long syntax.

func ParseVolume

func ParseVolume(spec string) (types.ServiceVolumeConfig, error)

ParseVolume parses a volume spec without any knowledge of the target platform

func ShortSyntax added in v2.17.0

func ShortSyntax(v types.ServiceVolumeConfig) (string, bool)

ShortSyntax renders a volume in the short syntax, `[SOURCE:]TARGET[:OPTIONS]`, leaving out the options that are the default (`rw`). It reports false when the short syntax can't say what the volume says, which is when no spelling of it parses back as the same volume: something it has no place for (a tmpfs, an image, a subpath, labels, a consistency, extensions...), or something it would read otherwise (a colon in a path, a bind source that is not a path, a bind that doesn't create its host path).

Types

This section is empty.

Jump to

Keyboard shortcuts

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