Skip to content

Commit

Permalink
Update to clap v3
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Jan 10, 2022
1 parent 630f024 commit 7b5da34
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 39 deletions.
56 changes: 26 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
[package]
authors = ["chevdor <chevdor@gmail.com>"]
description = "A command line utility written in Rust to render templates from json|toml|yaml && ENV, using the tera templating engine"
edition = "2021"
license = "MIT"
name = "teracli"
version = "0.2.1"
description = "A command line utility written in Rust to render templates from json|toml|yaml && ENV, using the tera templating engine"
readme = "README.md"
license = "MIT"
version = "0.2.1"

[dependencies]
clap = "=3.0.0-beta.4"
clap_derive = "=3.0.0-beta.4"
clap = {version = "3.0", features = ["derive", "env", "unicode", "cargo"]}
env_logger = "0.9"
log = "0.4"
serde = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mod template;
mod wrapped_context;

use crate::template::Template;
use clap::{crate_name, crate_version, Clap};
use clap::{crate_name, crate_version, StructOpt};
use env_logger::Env;
use log::{debug, info, trace};
use opts::*;
Expand Down
5 changes: 2 additions & 3 deletions src/opts.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use clap::{crate_authors, crate_version, AppSettings, Clap};
use clap::{crate_authors, crate_version, Parser};
use std::path::PathBuf;

/// Command line utility for the tera templating engine. You need to provide a template using the tera syntax
/// as well as some data (various format are supported).
#[derive(Clap, Debug)]
#[derive(Debug, Parser)]
#[clap(version = crate_version!(), author = crate_authors!())]
#[clap(setting = AppSettings::ColoredHelp)]
pub struct Opts {
/// Location of the template.
#[clap(short, long)]
Expand Down

0 comments on commit 7b5da34

Please sign in to comment.