Skip to content

Commit

Permalink
v1.0.0-beta (#13)
Browse files Browse the repository at this point in the history
* replacing html/template with text/template, updating README.md

* updating README.md
  • Loading branch information
gulien authored Jul 19, 2017
1 parent 00129dd commit 2b9982e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ orbit version

## Generating a file from a template

Orbit uses the *Go* package `html/template` under the hood as a template
Orbit uses the *Go* package `text/template` under the hood as a template
engine. It provides a interesting amount of logic for your templates.

The [Go documentation](https://golang.org/pkg/text/template/) and the
Expand Down Expand Up @@ -260,7 +260,11 @@ Let's create our simple configuration file `orbit.yml`:
commands:
- use: "os"
run:
- echo "Current OS is {{ .Os }}"
{{- if ne .Os "windows" }}
- echo Current OS is {{ .Os }}
{{- else }}
- cmd.exe /c echo Current OS is {{ .Os }}
{(- end }}
```

You are now able to run:
Expand All @@ -273,7 +277,7 @@ This command will print something like:

```
[i] starting Orbit command "os"
[i] running "echo "Current OS is darwin""
[i] running "echo Current OS is darwin"
"Current OS is darwin"
```

Expand Down
2 changes: 1 addition & 1 deletion generator/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ package generator
import (
"bytes"
"fmt"
"html/template"
"os"
"text/template"

"github.com/gulien/orbit/context"
)
Expand Down

0 comments on commit 2b9982e

Please sign in to comment.