mirror of
https://github.com/KevinMidboe/motdGO.git
synced 2025-10-29 17:50:24 +00:00
Please use go fmt to format the code
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/fatih/color"
|
"github.com/fatih/color"
|
||||||
"github.com/getwe/figlet4go"
|
"github.com/getwe/figlet4go"
|
||||||
"flag"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var flag_str = flag.String("str", "golang", "input string")
|
var flag_str = flag.String("str", "golang", "input string")
|
||||||
@@ -29,7 +29,7 @@ func main() {
|
|||||||
options := figlet4go.NewRenderOptions()
|
options := figlet4go.NewRenderOptions()
|
||||||
options.FontColor = make([]color.Attribute, len(str))
|
options.FontColor = make([]color.Attribute, len(str))
|
||||||
for i := range options.FontColor {
|
for i := range options.FontColor {
|
||||||
options.FontColor[i] = colors[i % len(colors)]
|
options.FontColor[i] = colors[i%len(colors)]
|
||||||
}
|
}
|
||||||
renderStr, _ = ascii.RenderOpts(str, options)
|
renderStr, _ = ascii.RenderOpts(str, options)
|
||||||
fmt.Println(renderStr)
|
fmt.Println(renderStr)
|
||||||
|
|||||||
Reference in New Issue
Block a user