#!/usr/bin/env dub
/+ dub.sdl:
name "docker"
dependency "sparkles:core-cli" path="../../../../.."
targetPath "build"
// Optimised, assertions live, `debug {}` blocks out — the build every nix
// artifact uses. Neither `debug` (which compiles those blocks in) nor
// `release` (which deletes assert *expressions*, side effects included).
buildType "checked" {
buildOptions "optimize" "inline" "debugInfo"
}
+/
// ci: run --help
import (package) sparklessparkles.(package) sparkles.core_clicore_cli.(module) sparkles.core_cli.argsargs;
import (package) sparklessparkles.(package) sparkles.basebase.(module) sparkles.base.prettyprintprettyprint : (alias template) docker.prettyPrint = sparkles.base.prettyprint.prettyPrint(T, Hook = void)(in T value, in PrettyPrintOptions!Hook opt = PrettyPrintOptions!Hook())Convenience overload that returns a string.
prettyPrint;
import (package) sparklessparkles.(package) sparkles.basebase.(module) sparkles.base.styled_templateStyle template processing for IES (Interpolated Expression Sequences).
Provides a template syntax for applying terminal styles to IES strings:
import sparkles.base.styled_template;
int cpu = 75;
styledWriteln(i"CPU: {red $(cpu)%} Status: {green OK}");
Supported syntax:
{red text} — Apply single style
{bold.red text} — Chain multiple styles
{bold outer {red nested}} — Nested blocks (inner inherits outer)
{red text {~red normal}} — Negation with ~ removes a style
#{ — Escaped literal {
#} — Escaped literal }
styled_template : (alias template) docker.styledWriteln = sparkles.base.styled_template.styledWriteln(Args...)(ColorDepth depth, InterpolationHeader header, Args args, InterpolationFooter footer)Write styled IES to stdout with newline.
styledWriteln;
import (package) stdstd.(module) std.sumtypeSumType is a generic discriminated union implementation that uses
design-by-introspection to generate safe and efficient code. Its features
include:
Pattern matching.
Support for self-referential types.
Full attribute correctness (pure, @safe, @nogc, and nothrow are
inferred whenever possible).
A type-safe and memory-safe API compatible with DIP 1000 (scope).
No dependency on runtime type information (TypeInfo).
Compatibility with BetterC.
List of examples
Memory corruption (why assignment can be @system)
Source
std/sumtype.d
Examples
Basic usage
import std.math.operations : isClose;
struct Fahrenheit { double value; }
struct Celsius { double value; }
struct Kelvin { double value; }
alias Temperature = SumType!(Fahrenheit, Celsius, Kelvin);
// Construct from any of the member types.
Temperature t1 = Fahrenheit(98.6);
Temperature t2 = Celsius(100);
Temperature t3 = Kelvin(273);
// Use pattern matching to access the value.
Fahrenheit toFahrenheit(Temperature t)
{
return Fahrenheit(
t.match!(
(Fahrenheit f) => f.value,
(Celsius c) => c.value * 9.0/5 + 32,
(Kelvin k) => k.value * 9.0/5 - 459.4
)
);
}
assert(toFahrenheit(t1).value.isClose(98.6));
assert(toFahrenheit(t2).value.isClose(212));
assert(toFahrenheit(t3).value.isClose(32));
// Use ref to modify the value in place.
void freeze(ref Temperature t)
{
t.match!(
(ref Fahrenheit f) => f.value = 32,
(ref Celsius c) => c.value = 0,
(ref Kelvin k) => k.value = 273
);
}
freeze(t1);
assert(toFahrenheit(t1).value.isClose(32));
// Use a catch-all handler to give a default result.
bool isFahrenheit(Temperature t)
{
return t.match!(
(Fahrenheit f) => true,
_ => false
);
}
assert(isFahrenheit(t1));
assert(!isFahrenheit(t2));
assert(!isFahrenheit(t3));
Matching with an overload set
Instead of writing match handlers inline as lambdas, you can write them as
overloads of a function. An alias can be used to create an additional
overload for the SumType itself.
For example, with this overload set:
string handle(int n) { return "got an int"; }
string handle(string s) { return "got a string"; }
string handle(double d) { return "got a double"; }
alias handle = match!handle;
Usage would look like this:
alias ExampleSumType = SumType!(int, string, double);
ExampleSumType a = 123;
ExampleSumType b = "hello";
ExampleSumType c = 3.14;
assert(a.handle == "got an int");
assert(b.handle == "got a string");
assert(c.handle == "got a double");
Recursive SumTypes
This example makes use of the special placeholder type This to define a
recursive data type: an
abstract syntax tree for
representing simple arithmetic expressions.
import std.functional : partial;
import std.traits : EnumMembers;
import std.typecons : Tuple;
enum Op : string
{
Plus = "+",
Minus = "-",
Times = "*",
Div = "/"
}
// An expression is either
// - a number,
// - a variable, or
// - a binary operation combining two sub-expressions.
alias Expr = SumType!(
double,
string,
Tuple!(Op, "op", This*, "lhs", This*, "rhs")
);
// Shorthand for Tuple!(Op, "op", Expr*, "lhs", Expr*, "rhs"),
// the Tuple type above with Expr substituted for This.
alias BinOp = Expr.Types[2];
// Factory function for number expressions
Expr* num(double value)
{
return new Expr(value);
}
// Factory function for variable expressions
Expr* var(string name)
{
return new Expr(name);
}
// Factory function for binary operation expressions
Expr* binOp(Op op, Expr* lhs, Expr* rhs)
{
return new Expr(BinOp(op, lhs, rhs));
}
// Convenience wrappers for creating BinOp expressions
alias sum = partial!(binOp, Op.Plus);
alias diff = partial!(binOp, Op.Minus);
alias prod = partial!(binOp, Op.Times);
alias quot = partial!(binOp, Op.Div);
// Evaluate expr, looking up variables in env
double eval(Expr expr, double[string] env)
{
return expr.match!(
(double num) => num,
(string var) => env[var],
(BinOp bop)
{
double lhs = eval(*bop.lhs, env);
double rhs = eval(*bop.rhs, env);
final switch (bop.op)
{
static foreach (op; EnumMembers!Op)
{
case op:
return mixin("lhs" ~ op ~ "rhs");
}
}
}
);
}
// Return a "pretty-printed" representation of expr
string pprint(Expr expr)
{
import std.format : format;
return expr.match!(
(double num) => "%g".format(num),
(string var) => var,
(BinOp bop) => "(%s %s %s)".format(
pprint(*bop.lhs),
cast(string) bop.op,
pprint(*bop.rhs)
)
);
}
Expr* myExpr = sum(var("a"), prod(num(2), var("b")));
double[string] myEnv = ["a":3, "b":4, "c":7];
assert(eval(*myExpr, myEnv) == 11);
assert(pprint(*myExpr) == "(a + (2 * b))");
sumtype;
private enum (alias) object.string = stringstring[] (constant) string[] docker.restartPolicies = ["no", "on-failure", "always", "unless-stopped"]restartPolicies = [
"no", "on-failure", "always", "unless-stopped",
];
// ─── shared run-options struct ───────────────────────────────────────────
struct (struct) docker.ContainerRunOptionsContainerRunOptions
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`d|detach`, description: "Run the container in the background and print its ID"))
bool (field) bool docker.ContainerRunOptions.detachdetach;
@((struct) sparkles.core_cli.args.uda.OptionOption(`i|interactive`, description: "Keep STDIN open even if not attached"))
bool (field) bool docker.ContainerRunOptions.interactiveinteractive;
@((struct) sparkles.core_cli.args.uda.OptionOption(`t|tty`, description: "Allocate a pseudo-TTY"))
bool (field) bool docker.ContainerRunOptions.ttytty;
@((struct) sparkles.core_cli.args.uda.OptionOption(`name`, description: "Assign a name to the container"))
(alias) object.string = stringstring (field) string docker.ContainerRunOptions.namename;
@((struct) sparkles.core_cli.args.uda.OptionOption(`e|env`, description: "Set environment variables in the container. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRunOptions.envenv;
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|volume`, description: "Bind-mount a volume into the container. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRunOptions.volumesvolumes;
@((struct) sparkles.core_cli.args.uda.OptionOption(`p|publish`, description: "Publish a container port to the host. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRunOptions.publishpublish;
@((struct) sparkles.core_cli.args.uda.OptionOption(`l|label`, description: "Set metadata on the container. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRunOptions.labelslabels;
@((struct) sparkles.core_cli.args.uda.OptionOption(`network`, description: "Connect the container to a named network"))
(alias) object.string = stringstring (field) string docker.ContainerRunOptions.networknetwork;
@((struct) sparkles.core_cli.args.uda.OptionOption(`restart`, allowedValues: (constant) string[] docker.restartPolicies = ["no", "on-failure", "always", "unless-stopped"]restartPolicies))
(alias) object.string = stringstring (field) string docker.ContainerRunOptions.restartrestart = "no";
@((struct) sparkles.core_cli.args.uda.OptionOption(`rm`, description: "Automatically remove the container when it exits"))
bool (field) bool docker.ContainerRunOptions.autoRemoveautoRemove;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("image"))
(alias) object.string = stringstring (field) string docker.ContainerRunOptions.imageimage;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("command", optional: true))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRunOptions.commandcommand;
}
// ─── container group ─────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("run",
shortDescription: "Create and run a new container from an image",
helpSections: ["description"],
))
struct (struct) docker.ContainerRunContainerRun
{
@(struct) sparkles.core_cli.args.uda.FlattenUDA to flatten a nested struct of CLI options into the parent command struct.
When a struct field is annotated with @Flatten``, its fields participate in
option parsing, short-option bundling, positional argument assignment, and
validation as if they were declared directly on the enclosing command.
Flatten
(struct) docker.ContainerRunOptionsContainerRunOptions (field) docker.ContainerRunOptions docker.ContainerRun.runOptionsrunOptions;
void void docker.ContainerRun.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container run with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerRun, void)(in docker.ContainerRun value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("ls",
aliases: ["ps"],
shortDescription: "List containers",
helpSections: ["description"],
))
struct (struct) docker.ContainerLsContainerLs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Show all containers (default shows just running)"))
bool (field) bool docker.ContainerLs.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display container IDs"))
bool (field) bool docker.ContainerLs.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output based on conditions provided. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerLs.filtersfilters;
@((struct) sparkles.core_cli.args.uda.OptionOption(`format`, description: "Pretty-print containers using a Go template"))
(alias) object.string = stringstring (field) string docker.ContainerLs.formatformat;
@((struct) sparkles.core_cli.args.uda.OptionOption(`s|size`, description: "Display total file sizes"))
bool (field) bool docker.ContainerLs.sizesize;
void void docker.ContainerLs.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container ls with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerLs, void)(in docker.ContainerLs value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("stop",
shortDescription: "Stop one or more running containers",
helpSections: ["description"],
))
struct (struct) docker.ContainerStopContainerStop
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`t|time`, description: "Seconds to wait for stop before killing the container"))
int (field) int docker.ContainerStop.timetime = 10;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("containers"))
(alias) object.string = stringstring[] (field) string[] docker.ContainerStop.containerscontainers;
void void docker.ContainerStop.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container stop with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerStop, void)(in docker.ContainerStop value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rm",
shortDescription: "Remove one or more containers",
helpSections: ["description"],
))
struct (struct) docker.ContainerRmContainerRm
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Force-remove a running container (uses SIGKILL)"))
bool (field) bool docker.ContainerRm.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|volumes`, description: "Remove anonymous volumes associated with the container"))
bool (field) bool docker.ContainerRm.volumesvolumes;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("containers"))
(alias) object.string = stringstring[] (field) string[] docker.ContainerRm.containerscontainers;
void void docker.ContainerRm.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container rm with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerRm, void)(in docker.ContainerRm value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("exec",
shortDescription: "Run a command in a running container",
helpSections: ["description"],
))
struct (struct) docker.ContainerExecContainerExec
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`d|detach`, description: "Detached mode: run the command in the background"))
bool (field) bool docker.ContainerExec.detachdetach;
@((struct) sparkles.core_cli.args.uda.OptionOption(`i|interactive`, description: "Keep STDIN open"))
bool (field) bool docker.ContainerExec.interactiveinteractive;
@((struct) sparkles.core_cli.args.uda.OptionOption(`t|tty`, description: "Allocate a pseudo-TTY"))
bool (field) bool docker.ContainerExec.ttytty;
@((struct) sparkles.core_cli.args.uda.OptionOption(`u|user`, description: "Username or UID inside the container"))
(alias) object.string = stringstring (field) string docker.ContainerExec.useruser;
@((struct) sparkles.core_cli.args.uda.OptionOption(`w|workdir`, description: "Working directory inside the container"))
(alias) object.string = stringstring (field) string docker.ContainerExec.workdirworkdir;
@((struct) sparkles.core_cli.args.uda.OptionOption(`e|env`, description: "Set environment variables. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ContainerExec.envenv;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("container"))
(alias) object.string = stringstring (field) string docker.ContainerExec.containercontainer;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("command"))
(alias) object.string = stringstring[] (field) string[] docker.ContainerExec.commandcommand;
void void docker.ContainerExec.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container exec with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerExec, void)(in docker.ContainerExec value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("logs",
shortDescription: "Fetch the logs of a container",
helpSections: ["description"],
))
struct (struct) docker.ContainerLogsContainerLogs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|follow`, description: "Follow log output as it is produced"))
bool (field) bool docker.ContainerLogs.followfollow;
@((struct) sparkles.core_cli.args.uda.OptionOption(`t|timestamps`, description: "Show timestamps on every log line"))
bool (field) bool docker.ContainerLogs.timestampstimestamps;
@((struct) sparkles.core_cli.args.uda.OptionOption(`since`, description: "Show logs since timestamp (e.g. 2024-01-01) or relative (e.g. 42m for 42 minutes)"))
(alias) object.string = stringstring (field) string docker.ContainerLogs.sincesince;
@((struct) sparkles.core_cli.args.uda.OptionOption(`until`, description: "Show logs before the given timestamp"))
(alias) object.string = stringstring (field) string docker.ContainerLogs.untiluntil;
@((struct) sparkles.core_cli.args.uda.OptionOption(`n|tail`, description: "Number of lines to show from the end of the logs (default: all)"))
(alias) object.string = stringstring (field) string docker.ContainerLogs.tailtail = "all";
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("container"))
(alias) object.string = stringstring (field) string docker.ContainerLogs.containercontainer;
void void docker.ContainerLogs.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker container logs with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ContainerLogs, void)(in docker.ContainerLogs value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("container",
shortDescription: "Manage containers",
helpSections: ["description"],
))
struct (struct) docker.ContainerContainer
{
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!(
(struct) docker.ContainerExecContainerExec,
(struct) docker.ContainerLogsContainerLogs,
(struct) docker.ContainerLsContainerLs,
(struct) docker.ContainerRmContainerRm,
(struct) docker.ContainerRunContainerRun,
(struct) docker.ContainerStopContainerStop,
) (field) std.sumtype.SumType!(ContainerExec, ContainerLogs, ContainerLs, ContainerRm, ContainerRun, ContainerStop) docker.Container.commandcommand;
}
// ─── image group ─────────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("build",
shortDescription: "Build an image from a Dockerfile",
helpSections: ["description"],
))
struct (struct) docker.ImageBuildImageBuild
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`t|tag`, description: "Name (and optionally tag) for the built image. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ImageBuild.tagstags;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|file`, description: "Name of the Dockerfile to use (default: PATH/Dockerfile)"))
(alias) object.string = stringstring (field) string docker.ImageBuild.filefile;
@((struct) sparkles.core_cli.args.uda.OptionOption(`build-arg`, description: "Set build-time variables. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ImageBuild.buildArgsbuildArgs;
@((struct) sparkles.core_cli.args.uda.OptionOption(`no-cache`, description: "Do not use cache when building the image"))
bool (field) bool docker.ImageBuild.noCachenoCache;
@((struct) sparkles.core_cli.args.uda.OptionOption(`pull`, description: "Always attempt to pull a newer version of each base image"))
bool (field) bool docker.ImageBuild.pullpull;
@((struct) sparkles.core_cli.args.uda.OptionOption(`target`, description: "Set the target build stage for multi-stage builds"))
(alias) object.string = stringstring (field) string docker.ImageBuild.targettarget;
@((struct) sparkles.core_cli.args.uda.OptionOption(`platform`, description: "Set the target platform for the build (e.g. linux/amd64)"))
(alias) object.string = stringstring (field) string docker.ImageBuild.platformplatform;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("path"))
(alias) object.string = stringstring (field) string docker.ImageBuild.pathpath;
void void docker.ImageBuild.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker image build with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ImageBuild, void)(in docker.ImageBuild value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("ls",
aliases: ["list"],
shortDescription: "List images",
helpSections: ["description"],
))
struct (struct) docker.ImageLsImageLs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Show all images including intermediate layers"))
bool (field) bool docker.ImageLs.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display image IDs"))
bool (field) bool docker.ImageLs.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`digests`, description: "Show image digests"))
bool (field) bool docker.ImageLs.digestsdigests;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.ImageLs.filtersfilters;
void void docker.ImageLs.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker image ls with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ImageLs, void)(in docker.ImageLs value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("pull",
shortDescription: "Download an image from a registry",
helpSections: ["description"],
))
struct (struct) docker.ImagePullImagePull
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all-tags`, description: "Download all tagged images in the repository"))
bool (field) bool docker.ImagePull.allTagsallTags;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Suppress verbose output"))
bool (field) bool docker.ImagePull.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`platform`, description: "Set the platform if the server supports multi-platform images"))
(alias) object.string = stringstring (field) string docker.ImagePull.platformplatform;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("image"))
(alias) object.string = stringstring (field) string docker.ImagePull.imageimage;
void void docker.ImagePull.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker image pull with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ImagePull, void)(in docker.ImagePull value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("push",
shortDescription: "Upload an image to a registry",
helpSections: ["description"],
))
struct (struct) docker.ImagePushImagePush
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all-tags`, description: "Push all tagged images in the repository"))
bool (field) bool docker.ImagePush.allTagsallTags;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Suppress verbose output"))
bool (field) bool docker.ImagePush.quietquiet;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("image"))
(alias) object.string = stringstring (field) string docker.ImagePush.imageimage;
void void docker.ImagePush.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker image push with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ImagePush, void)(in docker.ImagePush value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rm",
aliases: ["rmi"],
shortDescription: "Remove one or more images",
helpSections: ["description"],
))
struct (struct) docker.ImageRmImageRm
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Force-remove the image even if it has tags or running containers"))
bool (field) bool docker.ImageRm.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`no-prune`, description: "Do not delete untagged parent layers"))
bool (field) bool docker.ImageRm.noPrunenoPrune;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("images"))
(alias) object.string = stringstring[] (field) string[] docker.ImageRm.imagesimages;
void void docker.ImageRm.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker image rm with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.ImageRm, void)(in docker.ImageRm value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("image",
shortDescription: "Manage images",
helpSections: ["description"],
))
struct (struct) docker.ImageImage
{
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!((struct) docker.ImageBuildImageBuild, (struct) docker.ImageLsImageLs, (struct) docker.ImagePullImagePull, (struct) docker.ImagePushImagePush, (struct) docker.ImageRmImageRm) (field) std.sumtype.SumType!(ImageBuild, ImageLs, ImagePull, ImagePush, ImageRm) docker.Image.commandcommand;
}
// ─── network group ───────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("create",
shortDescription: "Create a network",
helpSections: ["description"],
))
struct (struct) docker.NetworkCreateNetworkCreate
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`d|driver`, allowedValues: ["bridge", "overlay", "host", "macvlan", "none"]))
(alias) object.string = stringstring (field) string docker.NetworkCreate.driverdriver = "bridge";
@((struct) sparkles.core_cli.args.uda.OptionOption(`subnet`, description: "Subnet in CIDR format that represents a network segment. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.NetworkCreate.subnetssubnets;
@((struct) sparkles.core_cli.args.uda.OptionOption(`gateway`, description: "IPv4/IPv6 gateway for the master subnet. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.NetworkCreate.gatewaysgateways;
@((struct) sparkles.core_cli.args.uda.OptionOption(`l|label`, description: "Set metadata on the network. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.NetworkCreate.labelslabels;
@((struct) sparkles.core_cli.args.uda.OptionOption(`internal`, description: "Restrict external access to the network"))
bool (field) bool docker.NetworkCreate.internalinternal;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("name"))
(alias) object.string = stringstring (field) string docker.NetworkCreate.namename;
void void docker.NetworkCreate.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker network create with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.NetworkCreate, void)(in docker.NetworkCreate value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("ls",
aliases: ["list"],
shortDescription: "List networks",
helpSections: ["description"],
))
struct (struct) docker.NetworkLsNetworkLs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display network IDs"))
bool (field) bool docker.NetworkLs.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.NetworkLs.filtersfilters;
void void docker.NetworkLs.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker network ls with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.NetworkLs, void)(in docker.NetworkLs value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("inspect",
shortDescription: "Display detailed information on one or more networks",
helpSections: ["description"],
))
struct (struct) docker.NetworkInspectNetworkInspect
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|format`, description: "Format the output using a Go template"))
(alias) object.string = stringstring (field) string docker.NetworkInspect.formatformat;
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|verbose`, description: "Verbose output for diagnostics"))
bool (field) bool docker.NetworkInspect.verboseverbose;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("networks"))
(alias) object.string = stringstring[] (field) string[] docker.NetworkInspect.networksnetworks;
void void docker.NetworkInspect.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker network inspect with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.NetworkInspect, void)(in docker.NetworkInspect value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("connect",
shortDescription: "Connect a container to a network",
helpSections: ["description"],
))
struct (struct) docker.NetworkConnectNetworkConnect
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`alias`, description: "Add a network-scoped alias for the container. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.NetworkConnect.aliasesaliases;
@((struct) sparkles.core_cli.args.uda.OptionOption(`ip`, description: "IPv4 address (e.g. 172.30.100.104) to assign to the container"))
(alias) object.string = stringstring (field) string docker.NetworkConnect.ipip;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("network"))
(alias) object.string = stringstring (field) string docker.NetworkConnect.networknetwork;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("container"))
(alias) object.string = stringstring (field) string docker.NetworkConnect.containercontainer;
void void docker.NetworkConnect.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker network connect with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.NetworkConnect, void)(in docker.NetworkConnect value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rm",
aliases: ["remove"],
shortDescription: "Remove one or more networks",
helpSections: ["description"],
))
struct (struct) docker.NetworkRmNetworkRm
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Do not error out when a network does not exist"))
bool (field) bool docker.NetworkRm.forceforce;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("networks"))
(alias) object.string = stringstring[] (field) string[] docker.NetworkRm.networksnetworks;
void void docker.NetworkRm.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker network rm with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.NetworkRm, void)(in docker.NetworkRm value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("network",
shortDescription: "Manage networks",
helpSections: ["description"],
))
struct (struct) docker.NetworkNetwork
{
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!((struct) docker.NetworkConnectNetworkConnect, (struct) docker.NetworkCreateNetworkCreate, (struct) docker.NetworkInspectNetworkInspect, (struct) docker.NetworkLsNetworkLs, (struct) docker.NetworkRmNetworkRm) (field) std.sumtype.SumType!(NetworkConnect, NetworkCreate, NetworkInspect, NetworkLs, NetworkRm) docker.Network.commandcommand;
}
// ─── volume group ────────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("create",
shortDescription: "Create a volume",
helpSections: ["description"],
))
struct (struct) docker.VolumeCreateVolumeCreate
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`d|driver`, allowedValues: ["local", "nfs", "tmpfs"]))
(alias) object.string = stringstring (field) string docker.VolumeCreate.driverdriver = "local";
@((struct) sparkles.core_cli.args.uda.OptionOption(`o|opt`, description: "Set driver-specific options. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.VolumeCreate.driverOptsdriverOpts;
@((struct) sparkles.core_cli.args.uda.OptionOption(`l|label`, description: "Set metadata on the volume. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.VolumeCreate.labelslabels;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("name", optional: true))
(alias) object.string = stringstring (field) string docker.VolumeCreate.namename;
void void docker.VolumeCreate.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker volume create with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.VolumeCreate, void)(in docker.VolumeCreate value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("ls",
aliases: ["list"],
shortDescription: "List volumes",
helpSections: ["description"],
))
struct (struct) docker.VolumeLsVolumeLs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display volume names"))
bool (field) bool docker.VolumeLs.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.VolumeLs.filtersfilters;
void void docker.VolumeLs.run!(sparkles.core_cli.args.internal.CommandNode!(Docker))(in sparkles.core_cli.args.internal.CommandNode!(Docker) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Docker)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Docker)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold docker volume ls} with params:\n globals: --host=", core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)", string, core.interpolation.InterpolatedLiteral!", --log-level='", core.interpolation.InterpolatedExpression!"program.value.logLevel", string, core.interpolation.InterpolatedLiteral!"', --debug=", core.interpolation.InterpolatedExpression!"program.value.debug_", const(bool), core.interpolation.InterpolatedLiteral!"\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold docker volume ls} with params:\n globals: --host=" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!", --log-level='" __param_4, core.interpolation.InterpolatedExpression!"program.value.logLevel" __param_5, string __param_6, core.interpolation.InterpolatedLiteral!"', --debug=" __param_7, core.interpolation.InterpolatedExpression!"program.value.debug_" __param_8, const(bool) __param_9, core.interpolation.InterpolatedLiteral!"\n params: " __param_10, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_11, string __param_12, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold docker volume ls} with params:
globals: --host=$(prettyPrint(program.value.hosts)), --log-level='$(program.value.logLevel)', --debug=$(program.value.debug_)
params: $(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("inspect",
shortDescription: "Display detailed information on one or more volumes",
helpSections: ["description"],
))
struct (struct) docker.VolumeInspectVolumeInspect
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|format`, description: "Format the output using a Go template"))
(alias) object.string = stringstring (field) string docker.VolumeInspect.formatformat;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("volumes"))
(alias) object.string = stringstring[] (field) string[] docker.VolumeInspect.volumesvolumes;
void void docker.VolumeInspect.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker volume inspect with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.VolumeInspect, void)(in docker.VolumeInspect value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("prune",
shortDescription: "Remove all unused local volumes",
helpSections: ["description"],
))
struct (struct) docker.VolumePruneVolumePrune
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Do not prompt for confirmation"))
bool (field) bool docker.VolumePrune.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Remove all unused volumes, not just anonymous ones"))
bool (field) bool docker.VolumePrune.allall;
void void docker.VolumePrune.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker volume prune with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.VolumePrune, void)(in docker.VolumePrune value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rm",
aliases: ["remove"],
shortDescription: "Remove one or more volumes",
helpSections: ["description"],
))
struct (struct) docker.VolumeRmVolumeRm
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Force the removal of one or more volumes"))
bool (field) bool docker.VolumeRm.forceforce;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("volumes"))
(alias) object.string = stringstring[] (field) string[] docker.VolumeRm.volumesvolumes;
void void docker.VolumeRm.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker volume rm with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.VolumeRm, void)(in docker.VolumeRm value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("volume",
shortDescription: "Manage volumes",
helpSections: ["description"],
))
struct (struct) docker.VolumeVolume
{
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!((struct) docker.VolumeCreateVolumeCreate, (struct) docker.VolumeInspectVolumeInspect, (struct) docker.VolumeLsVolumeLs, (struct) docker.VolumePruneVolumePrune, (struct) docker.VolumeRmVolumeRm) (field) std.sumtype.SumType!(VolumeCreate, VolumeInspect, VolumeLs, VolumePrune, VolumeRm) docker.Volume.commandcommand;
}
// ─── system group ────────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("df",
shortDescription: "Show docker disk usage",
helpSections: ["description"],
))
struct (struct) docker.SystemDfSystemDf
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|verbose`, description: "Show detailed information on space usage"))
bool (field) bool docker.SystemDf.verboseverbose;
@((struct) sparkles.core_cli.args.uda.OptionOption(`format`, description: "Format the output using a Go template"))
(alias) object.string = stringstring (field) string docker.SystemDf.formatformat;
void void docker.SystemDf.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker system df with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.SystemDf, void)(in docker.SystemDf value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("prune",
shortDescription: "Remove unused data",
helpSections: ["description"],
))
struct (struct) docker.SystemPruneSystemPrune
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Do not prompt for confirmation"))
bool (field) bool docker.SystemPrune.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Remove all unused images, not just dangling ones"))
bool (field) bool docker.SystemPrune.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`volumes`, description: "Prune anonymous volumes too"))
bool (field) bool docker.SystemPrune.volumesvolumes;
@((struct) sparkles.core_cli.args.uda.OptionOption(`filter`, description: "Provide filter values (e.g. 'label=foo'). Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.SystemPrune.filtersfilters;
void void docker.SystemPrune.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker system prune with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.SystemPrune, void)(in docker.SystemPrune value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("info",
shortDescription: "Display system-wide information",
helpSections: ["description"],
))
struct (struct) docker.SystemInfoSystemInfo
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|format`, description: "Format the output using a Go template"))
(alias) object.string = stringstring (field) string docker.SystemInfo.formatformat;
void void docker.SystemInfo.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker system info with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.SystemInfo, void)(in docker.SystemInfo value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("events",
shortDescription: "Stream real-time events from the docker daemon",
helpSections: ["description"],
))
struct (struct) docker.SystemEventsSystemEvents
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`since`, description: "Show events created since timestamp"))
(alias) object.string = stringstring (field) string docker.SystemEvents.sincesince;
@((struct) sparkles.core_cli.args.uda.OptionOption(`until`, description: "Stream events until timestamp"))
(alias) object.string = stringstring (field) string docker.SystemEvents.untiluntil;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter events. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.SystemEvents.filtersfilters;
@((struct) sparkles.core_cli.args.uda.OptionOption(`format`, description: "Format the output using a Go template"))
(alias) object.string = stringstring (field) string docker.SystemEvents.formatformat;
void void docker.SystemEvents.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker system events with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.SystemEvents, void)(in docker.SystemEvents value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("system",
shortDescription: "Manage Docker",
helpSections: ["description"],
))
struct (struct) docker.SystemSystem
{
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!((struct) docker.SystemDfSystemDf, (struct) docker.SystemEventsSystemEvents, (struct) docker.SystemInfoSystemInfo, (struct) docker.SystemPruneSystemPrune) (field) std.sumtype.SumType!(SystemDf, SystemEvents, SystemInfo, SystemPrune) docker.System.commandcommand;
}
// ─── top-level shortcut commands ─────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("run",
shortDescription: "Create and run a new container from an image (alias for `container run`)",
helpSections: ["description"],
))
struct (struct) docker.RunRun
{
@(struct) sparkles.core_cli.args.uda.FlattenUDA to flatten a nested struct of CLI options into the parent command struct.
When a struct field is annotated with @Flatten``, its fields participate in
option parsing, short-option bundling, positional argument assignment, and
validation as if they were declared directly on the enclosing command.
Flatten
(struct) docker.ContainerRunOptionsContainerRunOptions (field) docker.ContainerRunOptions docker.Run.runOptionsrunOptions;
void void docker.Run.run!(sparkles.core_cli.args.internal.CommandNode!(Docker))(in sparkles.core_cli.args.internal.CommandNode!(Docker) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Docker)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Docker)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold docker run} with params:\n globals: --host=", core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)", string, core.interpolation.InterpolatedLiteral!", --log-level='", core.interpolation.InterpolatedExpression!"program.value.logLevel", string, core.interpolation.InterpolatedLiteral!"', --debug=", core.interpolation.InterpolatedExpression!"program.value.debug_", const(bool), core.interpolation.InterpolatedLiteral!"\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold docker run} with params:\n globals: --host=" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!", --log-level='" __param_4, core.interpolation.InterpolatedExpression!"program.value.logLevel" __param_5, string __param_6, core.interpolation.InterpolatedLiteral!"', --debug=" __param_7, core.interpolation.InterpolatedExpression!"program.value.debug_" __param_8, const(bool) __param_9, core.interpolation.InterpolatedLiteral!"\n params: " __param_10, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_11, string __param_12, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold docker run} with params:
globals: --host=$(prettyPrint(program.value.hosts)), --log-level='$(program.value.logLevel)', --debug=$(program.value.debug_)
params: $(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("ps",
shortDescription: "List containers (alias for `container ls`)",
helpSections: ["description"],
))
struct (struct) docker.PsPs
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Show all containers (default shows just running)"))
bool (field) bool docker.Ps.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display container IDs"))
bool (field) bool docker.Ps.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output based on conditions provided. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.Ps.filtersfilters;
@((struct) sparkles.core_cli.args.uda.OptionOption(`format`, description: "Pretty-print containers using a Go template"))
(alias) object.string = stringstring (field) string docker.Ps.formatformat;
@((struct) sparkles.core_cli.args.uda.OptionOption(`s|size`, description: "Display total file sizes"))
bool (field) bool docker.Ps.sizesize;
void void docker.Ps.run!(sparkles.core_cli.args.internal.CommandNode!(Docker))(in sparkles.core_cli.args.internal.CommandNode!(Docker) program) @systemrun(Program)(in (alias) Program = sparkles.core_cli.args.internal.CommandNode!(Docker)Program (parameter) const(sparkles.core_cli.args.internal.CommandNode!(Docker)) programprogram) =>
void sparkles.base.styled_template.styledWriteln!(core.interpolation.InterpolatedLiteral!"Running {bold docker ps} with params:\n globals: --host=", core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)", string, core.interpolation.InterpolatedLiteral!", --log-level='", core.interpolation.InterpolatedExpression!"program.value.logLevel", string, core.interpolation.InterpolatedLiteral!"', --debug=", core.interpolation.InterpolatedExpression!"program.value.debug_", const(bool), core.interpolation.InterpolatedLiteral!"\n params: ", core.interpolation.InterpolatedExpression!"prettyPrint(this)", string)(core.interpolation.InterpolationHeader header, core.interpolation.InterpolatedLiteral!"Running {bold docker ps} with params:\n globals: --host=" __param_1, core.interpolation.InterpolatedExpression!"prettyPrint(program.value.hosts)" __param_2, string __param_3, core.interpolation.InterpolatedLiteral!", --log-level='" __param_4, core.interpolation.InterpolatedExpression!"program.value.logLevel" __param_5, string __param_6, core.interpolation.InterpolatedLiteral!"', --debug=" __param_7, core.interpolation.InterpolatedExpression!"program.value.debug_" __param_8, const(bool) __param_9, core.interpolation.InterpolatedLiteral!"\n params: " __param_10, core.interpolation.InterpolatedExpression!"prettyPrint(this)" __param_11, string __param_12, core.interpolation.InterpolationFooter footer) @systemditto — defaults to ColorDepth.trueColor.
styledWriteln(i"Running {bold docker ps} with params:
globals: --host=$(prettyPrint(program.value.hosts)), --log-level='$(program.value.logLevel)', --debug=$(program.value.debug_)
params: $(prettyPrint(this))");
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("images",
shortDescription: "List images (alias for `image ls`)",
helpSections: ["description"],
))
struct (struct) docker.ImagesImages
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`a|all`, description: "Show all images including intermediate layers"))
bool (field) bool docker.Images.allall;
@((struct) sparkles.core_cli.args.uda.OptionOption(`q|quiet`, description: "Only display image IDs"))
bool (field) bool docker.Images.quietquiet;
@((struct) sparkles.core_cli.args.uda.OptionOption(`digests`, description: "Show image digests"))
bool (field) bool docker.Images.digestsdigests;
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|filter`, description: "Filter output. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.Images.filtersfilters;
void void docker.Images.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker images with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.Images, void)(in docker.Images value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rm",
shortDescription: "Remove one or more containers (alias for `container rm`)",
helpSections: ["description"],
))
struct (struct) docker.RmRm
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Force-remove a running container (uses SIGKILL)"))
bool (field) bool docker.Rm.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`v|volumes`, description: "Remove anonymous volumes associated with the container"))
bool (field) bool docker.Rm.volumesvolumes;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("containers"))
(alias) object.string = stringstring[] (field) string[] docker.Rm.containerscontainers;
void void docker.Rm.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker rm with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.Rm, void)(in docker.Rm value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
@((struct) sparkles.core_cli.args.uda.CommandCommand("rmi",
shortDescription: "Remove one or more images (alias for `image rm`)",
helpSections: ["description"],
))
struct (struct) docker.RmiRmi
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`f|force`, description: "Force-remove the image even if it has tags or running containers"))
bool (field) bool docker.Rmi.forceforce;
@((struct) sparkles.core_cli.args.uda.OptionOption(`no-prune`, description: "Do not delete untagged parent layers"))
bool (field) bool docker.Rmi.noPrunenoPrune;
@((struct) sparkles.core_cli.args.uda.ArgumentArgument("images"))
(alias) object.string = stringstring[] (field) string[] docker.Rmi.imagesimages;
void void docker.Rmi.run()run()
{
import (package) stdstd.(module) std.stdioCategory Symbols File handles _popen File isFileHandle openNetwork stderr stdin stdout Reading chunks lines readf readfln readln Writing toFile write writef writefln writeln Misc KeepTerminator LockType StdioException
Standard I/O functions that extend core.stdc.stdio. core.stdc.stdio
is publically imported when importing std.stdio.
There are three layers of I/O:
The lowest layer is the operating system layer. The two main schemes are Windows and Posix.
C's stdio.h which unifies the two operating system schemes.
std.stdio, this module, unifies the various stdio.h implementations into
a high level package for D programs.
Source
std/stdio.d
stdio : (alias template) writeln = std.stdio.writeln(T...)(T args)Equivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Params:
args = the items to write to stdout
Throws:
In case of an I/O error, throws an $(LREF StdioException).
Example:
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
---
writeln;
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln("Running docker rmi with params:");
void std.stdio.writeln!string(string __param_0) @safeEquivalent to write(args, '\n'). Calling writeln without
arguments is valid and just prints a newline to the standard
output.
Example
Reads stdin and writes it to stdout with an argument
counter.
import std.stdio;
void main()
{
string line;
for (size_t count = 0; (line = readln) !is null; count++)
{
writeln("Input ", count, ": ", line);
}
}
writeln(string sparkles.base.prettyprint.prettyPrint!(docker.Rmi, void)(in docker.Rmi value, in sparkles.base.prettyprint.PrettyPrintOptions!void opt = PrettyPrintOptions(cast(ushort)2u, cast(ushort)8u, 32u, 80u, true, false)) pure nothrow @safeConvenience overload that returns a string.
prettyPrint(this));
}
}
// ─── root ────────────────────────────────────────────────────────────────
@((struct) sparkles.core_cli.args.uda.CommandCommand("docker",
shortDescription: "A self-sufficient runtime for containers",
helpSections: ["description", "examples"],
))
struct (struct) docker.DockerDocker
{
@((struct) sparkles.core_cli.args.uda.OptionOption(`H|host`, description: "Daemon socket(s) to connect to. Can be specified multiple times."))
(alias) object.string = stringstring[] (field) string[] docker.Docker.hostshosts;
@((struct) sparkles.core_cli.args.uda.OptionOption(`l|log-level`, allowedValues: ["debug", "info", "warn", "error", "fatal"]))
(alias) object.string = stringstring (field) string docker.Docker.logLevellogLevel = "info";
@((struct) sparkles.core_cli.args.uda.OptionOption(`D|debug`, description: "Enable debug mode"))
bool (field) bool docker.Docker.debug_debug_;
@(struct) sparkles.core_cli.args.uda.SubcommandsSubcommands
SumType!(
(struct) docker.ContainerContainer,
(struct) docker.ImageImage,
(struct) docker.ImagesImages,
(struct) docker.NetworkNetwork,
(struct) docker.PsPs,
(struct) docker.RmRm,
(struct) docker.RmiRmi,
(struct) docker.RunRun,
(struct) docker.SystemSystem,
(struct) docker.VolumeVolume,
) (field) std.sumtype.SumType!(Container, Image, Images, Network, Ps, Rm, Rmi, Run, System, Volume) docker.Docker.commandcommand;
}
int int D main(string[] args)main((alias) object.string = stringstring[] (parameter) string[] argsargs)
{
return int sparkles.core_cli.args.internal.runCli!(docker.Docker)(string[] argv) @systemrunCli!(struct) docker.DockerDocker((parameter) string[] argsargs);
}