You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`{{ .Now "Monday, 2 Jan 2006" }}`|`time.Now().Format("Monday, 2 Jan 2006")`|
115
117
116
118
Please see the layout of the function **.Now** in https://github.com/golang/go/blob/f06795d9b742cf3292a0f254646c23603fc6419b/src/time/format.go#L9-L41
117
119
120
+
## Title
121
+
122
+
Title generates ascii art for you using [go-figure](https://github.com/common-nighthawk/go-figure)
123
+
Use it if you don't provide your own ascii title.
124
+
125
+
See [examples/title](./examples/title) for an example
126
+
127
+
**Note:** Must provide zero values if not using something i.e.
128
+
129
+
```go
130
+
// .Title string string int
131
+
// .Title title fontname indentation_spaces
132
+
{{ .Title"Banner"""0 }}
133
+
{{ .Title"Banner""banner2"0 }}
134
+
{{ .Title"Banner"""4 }}
135
+
```
136
+
137
+
The fonts available can be seen here [go-figure#supported-fonts](https://github.com/common-nighthawk/go-figure#supported-fonts)
138
+
118
139
## Colors
119
140
120
141
There are support for ANSI colors :)
121
142
122
-
| Variable |
123
-
|-------------------------------------------|
124
-
|```{{ .AnsiColor.Default }}```|
125
-
|```{{ .AnsiColor.Black }}```|
126
-
|```{{ .AnsiColor.Red }}```|
127
-
|```{{ .AnsiColor.Green }}```|
128
-
|```{{ .AnsiColor.Yellow }}```|
129
-
|```{{ .AnsiColor.Blue }}```|
130
-
|```{{ .AnsiColor.Magenta }}```|
131
-
|```{{ .AnsiColor.Cyan }}```|
132
-
|```{{ .AnsiColor.White }}```|
133
-
|```{{ .AnsiColor.BrightBlack }}```|
134
-
|```{{ .AnsiColor.BrightRed }}```|
135
-
|```{{ .AnsiColor.BrightGreen }}```|
136
-
|```{{ .AnsiColor.BrightYellow }}```|
137
-
|```{{ .AnsiColor.BrightBlue }}```|
138
-
|```{{ .AnsiColor.BrightMagenta }}```|
139
-
|```{{ .AnsiColor.BrightCyan }}```|
140
-
|```{{ .AnsiColor.BrightWhite }}```|
141
-
|```{{ .AnsiBackground.Default }}```|
142
-
|```{{ .AnsiBackground.Black }}```|
143
-
|```{{ .AnsiBackground.Red }}```|
144
-
|```{{ .AnsiBackground.Green }}```|
145
-
|```{{ .AnsiBackground.Yellow }}```|
146
-
|```{{ .AnsiBackground.Blue }}```|
147
-
|```{{ .AnsiBackground.Magenta }}```|
148
-
|```{{ .AnsiBackground.Cyan }}```|
149
-
|```{{ .AnsiBackground.White }}```|
150
-
|```{{ .AnsiBackground.BrightBlack }}```|
151
-
|```{{ .AnsiBackground.BrightRed }}```|
152
-
|```{{ .AnsiBackground.BrightGreen }}```|
153
-
|```{{ .AnsiBackground.BrightYellow }}```|
154
-
|```{{ .AnsiBackground.BrightBlue }}```|
155
-
|```{{ .AnsiBackground.BrightMagenta }}```|
156
-
|```{{ .AnsiBackground.BrightCyan }}```|
157
-
|```{{ .AnsiBackground.BrightWhite }}```|
143
+
| Variable |
144
+
|-------------------------------------|
145
+
|`{{ .AnsiColor.Default }}`|
146
+
|`{{ .AnsiColor.Black }}`|
147
+
|`{{ .AnsiColor.Red }}`|
148
+
|`{{ .AnsiColor.Green }}`|
149
+
|`{{ .AnsiColor.Yellow }}`|
150
+
|`{{ .AnsiColor.Blue }}`|
151
+
|`{{ .AnsiColor.Magenta }}`|
152
+
|`{{ .AnsiColor.Cyan }}`|
153
+
|`{{ .AnsiColor.White }}`|
154
+
|`{{ .AnsiColor.BrightBlack }}`|
155
+
|`{{ .AnsiColor.BrightRed }}`|
156
+
|`{{ .AnsiColor.BrightGreen }}`|
157
+
|`{{ .AnsiColor.BrightYellow }}`|
158
+
|`{{ .AnsiColor.BrightBlue }}`|
159
+
|`{{ .AnsiColor.BrightMagenta }}`|
160
+
|`{{ .AnsiColor.BrightCyan }}`|
161
+
|`{{ .AnsiColor.BrightWhite }}`|
162
+
|`{{ .AnsiBackground.Default }}`|
163
+
|`{{ .AnsiBackground.Black }}`|
164
+
|`{{ .AnsiBackground.Red }}`|
165
+
|`{{ .AnsiBackground.Green }}`|
166
+
|`{{ .AnsiBackground.Yellow }}`|
167
+
|`{{ .AnsiBackground.Blue }}`|
168
+
|`{{ .AnsiBackground.Magenta }}`|
169
+
|`{{ .AnsiBackground.Cyan }}`|
170
+
|`{{ .AnsiBackground.White }}`|
171
+
|`{{ .AnsiBackground.BrightBlack }}`|
172
+
|`{{ .AnsiBackground.BrightRed }}`|
173
+
|`{{ .AnsiBackground.BrightGreen }}`|
174
+
|`{{ .AnsiBackground.BrightYellow }}`|
175
+
|`{{ .AnsiBackground.BrightBlue }}`|
176
+
|`{{ .AnsiBackground.BrightMagenta }}`|
177
+
|`{{ .AnsiBackground.BrightCyan }}`|
178
+
|`{{ .AnsiBackground.BrightWhite }}`|
158
179
159
180
Want to see a nyancat?
160
181
161
182
```sh
162
-
$ go run example/main.go -banner example/nyancat.txt
183
+
$ go run examples/file/main.go -banner examples/file/nyancat.txt
0 commit comments