diff --git a/README.md b/README.md index 801c040..01c4b9e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ go get -u github.com/probandula/figlet4go/... ### Command-line You can use the `figlet4go` command in the command-line like this: ```bash -figlet4go Hello +figlet4go -str "Hello CLI" ``` For a usage instruction read the commands usage with `figlet4go -h` diff --git a/bindata.go b/bindata.go index f44046c..9f6a272 100644 --- a/bindata.go +++ b/bindata.go @@ -161,7 +161,7 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ - "larry3d.flf": larry3dFlf, + "larry3d.flf": larry3dFlf, "standard.flf": standardFlf, } @@ -204,8 +204,9 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } + var _bintree = &bintree{nil, map[string]*bintree{ - "larry3d.flf": &bintree{larry3dFlf, map[string]*bintree{}}, + "larry3d.flf": &bintree{larry3dFlf, map[string]*bintree{}}, "standard.flf": &bintree{standardFlf, map[string]*bintree{}}, }} @@ -255,4 +256,3 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } - diff --git a/char.go b/char.go index 9781587..8601e55 100644 --- a/char.go +++ b/char.go @@ -2,8 +2,8 @@ package figlet4go import ( "errors" - "strings" "github.com/fatih/color" + "strings" ) type AsciiChar struct { @@ -25,7 +25,7 @@ func NewAsciiChar(font *font, char rune) (*AsciiChar, error) { lines := make([]string, height) for i := 0; i < height; i++ { - row := font.fontSlice[beginRow + i] + row := font.fontSlice[beginRow+i] row = strings.Replace(row, "@", "", -1) row = strings.Replace(row, font.hardblank, " ", -1) lines[i] = row @@ -41,4 +41,4 @@ func (char *AsciiChar) GetLine(index int) string { return colorFunc(char.Lines[index]) } return char.Lines[index] -} \ No newline at end of file +} diff --git a/render.go b/render.go index cebb4f0..1040250 100644 --- a/render.go +++ b/render.go @@ -75,7 +75,7 @@ func (ar *AsciiRender) RenderOpts(str string, opt *RenderOptions) (string, error // Set color if given if colored { // Start colors from beginning if length is reached - if curColorIndex == len(opt.FontColor) { + if curColorIndex == len(opt.FontColor) { curColorIndex = 0 } // Assign color and increment the index @@ -99,6 +99,6 @@ func (ar *AsciiRender) RenderOpts(str string, opt *RenderOptions) (string, error // A new line at the end result += "\n" } - + return result, nil }