feat: v1.11.17
This commit is contained in:
30
src/cmd_external_spec.rs
Normal file
30
src/cmd_external_spec.rs
Normal file
@@ -0,0 +1,30 @@
|
||||
use crate::util;
|
||||
use clap::{App, ArgMatches, SubCommand};
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
pub struct CommandImpl;
|
||||
|
||||
impl Command for CommandImpl {
|
||||
fn name(&self) -> &str {
|
||||
"external_spec"
|
||||
}
|
||||
|
||||
fn subcommand<'a>(&self) -> App<'a, 'a> {
|
||||
SubCommand::with_name(self.name()).about("External spec subcommand")
|
||||
}
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, _sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
let mut json = BTreeMap::new();
|
||||
json.insert("success", Value::Bool(true));
|
||||
json.insert(
|
||||
"agent",
|
||||
format!("card-external-provider/{}", env!("CARGO_PKG_VERSION")).into(),
|
||||
);
|
||||
json.insert("specification", "External/1.0.0-alpha".into());
|
||||
|
||||
util::print_pretty_json(&json);
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user