Skip to content

Commit 617d80e

Browse files
committed
Rename crate to gtmpl-ng for crates.io publishing
1 parent e4dc664 commit 617d80e

2 files changed

Lines changed: 21 additions & 18 deletions

File tree

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "gtmpl"
2+
name = "gtmpl-ng"
33
version = "0.7.2"
4-
authors = ["Florian Dieminger <me@fiji-flo.de>", "Paul Colin Hennig"]
5-
description = "The Golang Templating Language for Rust"
4+
authors = ["Florian Dieminger <me@fiji-flo.de>", "Paul Colin Hennig <8d_fvfmaa-o2wf_79aqig6g2ki6-09ffkeqmyo3d@vindelicum.eu>"]
5+
description = "The Golang Templating Language for Rust (fork with line number fix)"
66
license = "MIT"
77
repository = "https://github.com/firstdorsal/gtmpl-rust"
8-
documentation = "https://docs.rs/crate/gtmpl"
8+
documentation = "https://docs.rs/crate/gtmpl-ng"
99
keywords = ["golang", "template", "templating"]
1010
categories = ["template-engine"]
1111
readme = "README.md"

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# gtmpl-rust – Golang Templates for Rust
1+
# gtmpl-ng – Golang Templates for Rust
22

33
[![Latest Version]][crates.io]
44

5-
[Latest Version]: https://img.shields.io/crates/v/gtmpl.svg
6-
[crates.io]: https://crates.io/crates/gtmpl
5+
[Latest Version]: https://img.shields.io/crates/v/gtmpl-ng.svg
6+
[crates.io]: https://crates.io/crates/gtmpl-ng
77

88
---
99

10-
[gtmpl-rust] provides the [Golang text/template] engine for Rust. This enables
10+
This is a fork of [gtmpl-rust] with a fix for incorrect line number tracking in error messages.
11+
12+
[gtmpl-ng] provides the [Golang text/template] engine for Rust. This enables
1113
seamless integration of Rust application into the world of devops tools around
1214
[kubernetes], [docker] and whatnot.
1315

@@ -16,12 +18,12 @@ seamless integration of Rust application into the world of devops tools around
1618
Add the following dependency to your Cargo manifest…
1719
```toml
1820
[dependencies]
19-
gtmpl = "0.7"
21+
gtmpl-ng = "0.7"
2022
```
2123

2224
and look at the docs:
23-
* [gtmpl at crates.io](https://crates.io/crates/gtmpl)
24-
* [gtmpl documentation](https://docs.rs/crate/gtmpl)
25+
* [gtmpl-ng at crates.io](https://crates.io/crates/gtmpl-ng)
26+
* [gtmpl-ng documentation](https://docs.rs/crate/gtmpl-ng)
2527
* [golang documentation](https://golang.org/pkg/text/template/)
2628

2729

@@ -31,7 +33,7 @@ It's not perfect, yet. Help and feedback is more than welcome.
3133

3234
Basic template:
3335
```rust
34-
use gtmpl;
36+
use gtmpl_ng as gtmpl;
3537

3638
fn main() {
3739
let output = gtmpl::template("Finally! Some {{ . }} for Rust", "gtmpl");
@@ -42,7 +44,7 @@ fn main() {
4244
Adding custom functions:
4345
```rust
4446
use gtmpl_value::Function;
45-
use gtmpl::{FuncError, gtmpl_fn, template, Value};
47+
use gtmpl_ng::{FuncError, gtmpl_fn, template, Value};
4648

4749
fn main() {
4850
gtmpl_fn!(
@@ -65,7 +67,7 @@ struct Foo {
6567

6668
fn main() {
6769
let foo = Foo { bar: 42 };
68-
let output = gtmpl::template("The answer is: {{ .bar }}", foo);
70+
let output = gtmpl_ng::template("The answer is: {{ .bar }}", foo);
6971
assert_eq!(&output.unwrap(), "The answer is: 42");
7072
}
7173
```
@@ -74,7 +76,7 @@ Invoking a *method* on a context:
7476
```rust
7577

7678
use gtmpl_derive::Gtmpl;
77-
use gtmpl::{Func, FuncError, Value};
79+
use gtmpl_ng::{Func, FuncError, Value};
7880

7981
fn plus_one(args: &[Value]) -> Result<Value, FuncError> {
8082
if let Value::Object(ref o) = &args[0] {
@@ -95,7 +97,7 @@ struct AddMe {
9597

9698
fn main() {
9799
let add_me = AddMe { num: 42, plus_one };
98-
let output = gtmpl::template("The answer is: {{ .plus_one }}", add_me);
100+
let output = gtmpl_ng::template("The answer is: {{ .plus_one }}", add_me);
99101
assert_eq!(&output.unwrap(), "The answer is: 43");
100102
}
101103
```
@@ -118,7 +120,7 @@ there might be some convenient additions:
118120

119121
Enable `gtmpl_dynamic_template` in your `Cargo.toml`:
120122
```toml
121-
[dependencies.gtmpl]
123+
[dependencies.gtmpl-ng]
122124
version = "0.7"
123125
features = ["gtmpl_dynamic_template"]
124126

@@ -129,7 +131,7 @@ Now you can have dynamic template names for the `template` action.
129131
#### Example
130132

131133
```rust
132-
use gtmpl::{Context, Template};
134+
use gtmpl_ng::{Context, Template};
133135

134136
fn main() {
135137
let mut template = Template::default();
@@ -187,6 +189,7 @@ that feel native. [docker] and [helm] ([kubernetes]) use golang templates and
187189
it feels more native if tooling around them uses the same.
188190

189191
[gtmpl-rust]: https://github.com/fiji-flo/gtmpl-rust
192+
[gtmpl-ng]: https://github.com/firstdorsal/gtmpl-rust
190193
[Golang text/template]: https://golang.org/pkg/text/template/
191194
[kubernetes]: https://kubernetes.io
192195
[helm]: https://github.com/kubernetes/helm/blob/master/docs/chart_best_practices/templates.md

0 commit comments

Comments
 (0)