Skip to content

Commit 1d60daf

Browse files
authored
Wip (#1)
* restructure project Signed-off-by: Nico Braun <rainbowstack@gmail.com> * move decoder flag up in help output Signed-off-by: Nico Braun <rainbowstack@gmail.com> * fix go install command in readme Signed-off-by: Nico Braun <rainbowstack@gmail.com>
1 parent 571c34f commit 1d60daf

File tree

7 files changed

+250
-257
lines changed

7 files changed

+250
-257
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ver=0.1.0
1+
ver=0.1.1
22
bindir=bin
33
container_cli=docker
4-
cmd_dir=./cmd/
4+
cmd_dir=./cmd/tpl/
55

66
ldflags=-X 'main.version=$(ver)' -X 'main.commit=$(shell git rev-parse HEAD)'
77

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Go Template CLI (tpl)
22

3-
Render yaml and json with go templates from the command line.
3+
Render json, yaml, toml & xml with go templates from the command line.
44

5-
The templates are executed with the [text/template](https://pkg.go.dev/text/template) package. This means they come with the additional risks and benefits the text templates provide. Additionally, [Sprig functions](http://masterminds.github.io/sprig/) are available.
5+
The templates are executed with the [text/template](https://pkg.go.dev/text/template) package. This means they come with the additional risks and benefits the text templates provide.
66

77
## Synopsis
88

@@ -62,13 +62,13 @@ While json could technically be decoded using the yaml decoder, this is not done
6262

6363
## Functions
6464

65-
Next to the builtin functionality [Sprig functions](http://masterminds.github.io/sprig/) and [treasre-map functions](https://github.com/bluebrown/treasure-map) are available.
65+
Next to the builtin functions, sSprig functions](http://masterminds.github.io/sprig/) and [treasure-map functions](https://github.com/bluebrown/treasure-map) are available.
6666

6767
## Installation
6868

6969
### Binary
7070

71-
Download the binary from the [release page](https://github.com/bluebrown/tpl/releases). For example
71+
Download the binary from the [release page](https://github.com/bluebrown/go-template-cli/releases). For example
7272

7373
```bash
7474
curl -fsSLO https://github.com/bluebrown/go-template-cli/releases/download/v0.1.0/tpl-amd64-static.tar.gz
@@ -81,7 +81,7 @@ mv tpl-0.1.0-amd64-static /usr/local/bin/tpl
8181
If you have go installed, you can use the `go install` command to install the binary.
8282

8383
```bash
84-
go install github.com/bluebrown/tpl
84+
go install github.com/bluebrown/go-template-cli/cmd/tpl@latest
8585
```
8686

8787
### Docker
@@ -97,7 +97,7 @@ curl -s curl -s https://jsonplaceholder.typicode.com/todos | docker run -i blueb
9797
Clone the repo and use the makefile to build the binary. The make install command will move the binary to /usr/local/bin.
9898

9999
```bash
100-
git clone https://github.com/bluebrown/tpl
100+
git clone https://github.com/bluebrown/go-template-cli
101101
cd tpl && make install
102102
```
103103

assets/container/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG ldflags
99
RUN go build \
1010
-installsuffix static \
1111
-ldflags="${ldflags}" \
12-
-a -o tpl ./cmd/
12+
-a ./cmd/tpl
1313

1414
FROM scratch
1515
COPY --from=0 /workspace/passwd /etc/passwd

cmd/decoder.go

Lines changed: 0 additions & 69 deletions
This file was deleted.

cmd/init.go

Lines changed: 0 additions & 63 deletions
This file was deleted.

cmd/tpl.go

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)