Documentation
¶
Index ¶
- Constants
- Variables
- func Await(title string, ctx context.Context, action func(ctx context.Context) error) error
- func CopyFile(src, dest string) error
- func CreateTable() *table.Table
- func EllipsizeTo(str string, maxLength int) string
- func ExpandTemplate(template string) string
- func ExtractSubdomain(url string) string
- func FileExists(dir fs.FS, filename string) bool
- func HashString(str string) (string, error)
- func MapStrings(strs []string, fn func(string) string) []string
- func MoveDir(src, dest string) error
- func OpenInMeet(livekitURL, token string) error
- func PrintJSON(obj any)
- func ToUnixPath(p string) string
- func URLSafeName(projectURL string) (string, error)
- func UseTempPath(permanentPath string) (string, func() error, func() error)
- func WrapToLines(input string, maxLineLength int) []string
- func WrapWith(wrap string) func(string) string
- type OpenTarget
Constants ¶
View Source
const (
MeetURL = "https://meet.livekit.io/custom"
)
Variables ¶
View Source
var ( Theme = func() *huh.Theme { t := huh.ThemeBase16() t.Focused.FocusedButton = t.Focused.FocusedButton.Foreground(lipgloss.Color("7")).Background(lipgloss.Color("4")) t.Focused.TextInput.Cursor.Foreground(lipgloss.Color("4")) return t }() Accented = func(text string) string { return Theme.Focused.Title.Render(text) } Dimmed = func(text string) string { return Theme.Focused.Description.Render(text) } Fg = lipgloss.AdaptiveColor{Light: "235", Dark: "252"} FormBaseStyle = Theme.Form.Base.Foreground(Fg).Padding(0, 1) FormHeaderStyle = FormBaseStyle.Bold(true) )
View Source
var ( OpenFlag = &cli.StringFlag{ Name: "open", Usage: fmt.Sprintf("Open relevant `APP` in browser, supported options: %v", options), Validator: func(input string) error { if !slices.Contains(options, input) { return fmt.Errorf("invalid open target: %s, supported options: %v", input, options) } return nil }, } )
Functions ¶
func CreateTable ¶
func EllipsizeTo ¶
func ExpandTemplate ¶ added in v2.4.13
func ExtractSubdomain ¶ added in v2.4.6
func HashString ¶
func OpenInMeet ¶ added in v2.4.13
func ToUnixPath ¶ added in v2.5.2
Converts a path (possibly Windows-style) to a Unix-style path.
func URLSafeName ¶
func UseTempPath ¶
Provides a temporary path, a function to relocate it to a permanent path, and a function to clean up the temporary path that should always be deferred in the case of a failure to relocate.
func WrapToLines ¶
Types ¶
type OpenTarget ¶ added in v2.4.13
type OpenTarget string
const (
OpenTargetMeet OpenTarget = "meet"
)
Click to show internal directories.
Click to hide internal directories.