mirror of
https://github.com/KevinMidboe/motdGOi.git
synced 2025-10-29 17:50:24 +00:00
update readme, go fmt
This commit is contained in:
@@ -15,7 +15,7 @@ go get -u github.com/probandula/figlet4go/...
|
|||||||
### Command-line
|
### Command-line
|
||||||
You can use the `figlet4go` command in the command-line like this:
|
You can use the `figlet4go` command in the command-line like this:
|
||||||
```bash
|
```bash
|
||||||
figlet4go Hello
|
figlet4go -str "Hello CLI"
|
||||||
```
|
```
|
||||||
For a usage instruction read the commands usage with `figlet4go -h`
|
For a usage instruction read the commands usage with `figlet4go -h`
|
||||||
|
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ type bintree struct {
|
|||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*bintree
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
|
|
||||||
var _bintree = &bintree{nil, 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{}},
|
"standard.flf": &bintree{standardFlf, map[string]*bintree{}},
|
||||||
@@ -255,4 +256,3 @@ func _filePath(dir, name string) string {
|
|||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
char.go
4
char.go
@@ -2,8 +2,8 @@ package figlet4go
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"strings"
|
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AsciiChar struct {
|
type AsciiChar struct {
|
||||||
@@ -25,7 +25,7 @@ func NewAsciiChar(font *font, char rune) (*AsciiChar, error) {
|
|||||||
lines := make([]string, height)
|
lines := make([]string, height)
|
||||||
|
|
||||||
for i := 0; i < height; i++ {
|
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, "@", "", -1)
|
||||||
row = strings.Replace(row, font.hardblank, " ", -1)
|
row = strings.Replace(row, font.hardblank, " ", -1)
|
||||||
lines[i] = row
|
lines[i] = row
|
||||||
|
|||||||
Reference in New Issue
Block a user