You've already forked img-proxy-url-generator
Fixed some shit
This commit is contained in:
24
commands/interactive.go
Normal file
24
commands/interactive.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"github.com/siteworxpro/img-proxy-url-generator/interactive"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func Interactive() *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "interactive",
|
||||
Usage: "Start an interactive session",
|
||||
Action: func(c *cli.Context) error {
|
||||
p := tea.NewProgram(interactive.InitialModel(c), tea.WithAltScreen())
|
||||
|
||||
if _, err := p.Run(); err != nil {
|
||||
return fmt.Errorf("error running interactive session: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user