Documentation
¶
Overview ¶
Package geany contains the logo printing functionality.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrWriterNil = errors.New("writer is nil")
ErrWriterNil indicates that the provided io.Writer is nil and cannot be used.
Functions ¶
func PrintLogo ¶
PrintLogo is a convenience wrapper around PrintLogoWriter, as logos are normally printed to standard output.
func PrintLogoWriter ¶
PrintLogoWriter takes a text/template string as its parameter and renders it to be the logo. It offers the following data for the template:
- VcsRevision
- VcsTime
- VcsModified
- GoVersion
these can be referenced in the template, e.g., using `{{ .Geany.VcsRevision }}`. An additional custom value can be accessed via the Values field. Its type must match the way that it is accessed in the logo and is accessed using e.g. `{{ .Values.Foo }}`.
The template is parsed and executed. In case of an error, the program's name and user given data are printed as JSON as fallback. The original error and, in case, the error of the fallback are returned.
func PrintSimple ¶
PrintSimple is a convenience wrapper around PrintSimpleWriter, as logos are normally printed to standard output.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
logo_embed
command
Package main contains the geany example with embedded logo.
|
Package main contains the geany example with embedded logo. |
|
logo_file
command
Package main contains the geany example with read logo from a file.
|
Package main contains the geany example with read logo from a file. |
|
logo_owndata
command
Package main contains the geany example with embedded logo and custom data.
|
Package main contains the geany example with embedded logo and custom data. |
|
logo_simple
command
Package main contains the geany example with only the simple logo output.
|
Package main contains the geany example with only the simple logo output. |