mirror of
https://github.com/charmbracelet/gum
synced 2024-06-08 00:32:17 +02:00
18 lines
362 B
Go
18 lines
362 B
Go
|
package join
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/charmbracelet/gum/internal/decode"
|
||
|
"github.com/charmbracelet/lipgloss"
|
||
|
)
|
||
|
|
||
|
// Run is the command-line interface for the joining strings through lipgloss.
|
||
|
func (o Options) Run() {
|
||
|
join := lipgloss.JoinHorizontal
|
||
|
if o.Vertical {
|
||
|
join = lipgloss.JoinVertical
|
||
|
}
|
||
|
fmt.Println(join(decode.Align[o.Align], o.Text...))
|
||
|
}
|