module battery.detect.volta

Detect and find the volta command.

Code Map

//! Detect and find the volta command.
module battery.detect.volta;


//! Used as a argument when supplying a command on the command line.
struct FromArgs
{
public:
	cmd: string;
	args: string[];
}

//! The result of the dection, also holds any extra arguments to get volta
//! to output in the correct format.
struct Result
{
public:
	from: string;
	cmd: string;
	args: string[];
}

//! Detect rdmd from arguments.
fn detectFromArgs(arg: FromArgs, result: Result) bool { }
//! Check the battery config for rdmd.
fn detectFromBatConf(batConf: BatteryConfig, result: Result) bool { }
//! Add extra arguments to the command, any given args are appended after
//! the extra arguments.
fn addArgs(from: Result, arch: Arch, platform: Platform, res: Result) { }
struct FromArgs

Used as a argument when supplying a command on the command line.

struct Result

The result of the dection, also holds any extra arguments to get volta to output in the correct format.

fn detectFromArgs(arg: FromArgs, result: Result) bool

Detect rdmd from arguments.

fn detectFromBatConf(batConf: BatteryConfig, result: Result) bool

Check the battery config for rdmd.

fn addArgs(from: Result, arch: Arch, platform: Platform, res: Result)

Add extra arguments to the command, any given args are appended after the extra arguments.

global log: battery.util.log.Logger

So we get the right prefix on logged messages.

fn dump(res: Result, message: string)

Pretty print the result.