From 6fd2f828c577c6dd133af235502b1616feb55c08 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 17 Jun 2023 12:14:10 +0200 Subject: [PATCH] feat: with variable Signed-off-by: kjuulh --- rust-service/Cargo.toml | 4 ++-- rust-service/crates/{service => %%name%%}/.gitignore | 0 rust-service/crates/{service => %%name%%}/Cargo.toml | 0 rust-service/crates/{service => %%name%%}/src/main.rs | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename rust-service/crates/{service => %%name%%}/.gitignore (100%) rename rust-service/crates/{service => %%name%%}/Cargo.toml (100%) rename rust-service/crates/{service => %%name%%}/src/main.rs (97%) diff --git a/rust-service/Cargo.toml b/rust-service/Cargo.toml index d70b248..1dba7ae 100644 --- a/rust-service/Cargo.toml +++ b/rust-service/Cargo.toml @@ -1,9 +1,9 @@ [workspace] -members = ["crates/service"] +members = ["crates/%%name%%"] resolver = "2" [workspace.dependencies] -service = { path = "crates/service" } +%%name%% = { path = "crates/%%name%%" } anyhow = { version = "1.0.71" } tokio = { version = "1", features = ["full"] } diff --git a/rust-service/crates/service/.gitignore b/rust-service/crates/%%name%%/.gitignore similarity index 100% rename from rust-service/crates/service/.gitignore rename to rust-service/crates/%%name%%/.gitignore diff --git a/rust-service/crates/service/Cargo.toml b/rust-service/crates/%%name%%/Cargo.toml similarity index 100% rename from rust-service/crates/service/Cargo.toml rename to rust-service/crates/%%name%%/Cargo.toml diff --git a/rust-service/crates/service/src/main.rs b/rust-service/crates/%%name%%/src/main.rs similarity index 97% rename from rust-service/crates/service/src/main.rs rename to rust-service/crates/%%name%%/src/main.rs index 33f7c40..ac46a7b 100644 --- a/rust-service/crates/service/src/main.rs +++ b/rust-service/crates/%%name%%/src/main.rs @@ -45,5 +45,5 @@ async fn main() -> anyhow::Result<()> { } async fn root() -> &'static str { - "Hello, Service!" + "Hello, %%name%%!" }