diff --git a/char.go b/char.go index 8601e55..e4b850e 100644 --- a/char.go +++ b/char.go @@ -6,6 +6,7 @@ import ( "strings" ) +// Represents a single ascii character type AsciiChar struct { // Slice with the lines of the Char Lines []string @@ -13,6 +14,7 @@ type AsciiChar struct { Color color.Attribute } +// Creates a new ascii character func NewAsciiChar(font *font, char rune) (*AsciiChar, error) { // If not ascii, throw an error if char < 0 || char > 127 { @@ -24,6 +26,7 @@ func NewAsciiChar(font *font, char rune) (*AsciiChar, error) { lines := make([]string, height) + // Get the char lines of the char for i := 0; i < height; i++ { row := font.fontSlice[beginRow+i] row = strings.Replace(row, "@", "", -1) diff --git a/cmd/figlet4go/figlet4go.go b/cmd/figlet4go/figlet4go.go index 7c5a25c..c97ceb8 100644 --- a/cmd/figlet4go/figlet4go.go +++ b/cmd/figlet4go/figlet4go.go @@ -97,7 +97,6 @@ func getColorSlice(colorStr string) []color.Attribute { } return colors - } // Validate if all required options are given diff --git a/render.go b/render.go index 1040250..222031a 100644 --- a/render.go +++ b/render.go @@ -49,7 +49,7 @@ func (ar *AsciiRender) Render(str string) (string, error) { // Can be called from the user (if options wished) or the above Render method // Contains the whole rendering logic func (ar *AsciiRender) RenderOpts(str string, opt *RenderOptions) (string, error) { - + // Should the text be colored colored := len(opt.FontColor) > 0 // Load the font