gum/style/command.go
Maas Lalani 7190822247
refactor(kong): Implement Run(...) error interface
Instead of needing to run the commands manually in main.go, we can implement the `Run(...) error` method to satisfy the command interface so that `kong` can Run our commands for us.
2022-07-12 22:33:52 -04:00

15 lines
287 B
Go

package style
import (
"fmt"
"strings"
)
// Run provides a shell script interface for the Lip Gloss styling.
// https://github.com/charmbracelet/lipgloss
func (o Options) Run() error {
text := strings.Join(o.Text, "\n")
fmt.Println(o.Style.ToLipgloss().Render(text))
return nil
}