ui

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractProjectName

func ExtractProjectName(module string) string

ExtractProjectName extracts the project name from a module path

func ValidateModule

func ValidateModule(module string) error

ValidateModule validates that the module path is a proper Go module format

func ValidateProjectName

func ValidateProjectName(name string) error

ValidateProjectName validates that the project name follows slug-case format

Types

type Service

type Service interface {
	// ShowSpinner displays a spinner with a message and returns a stop function
	ShowSpinner(message string) func(completedMessage string)
	// PromptForModule interactively prompts for a Go module path
	PromptForModule() (string, error)
}

Service handles user interface operations like spinners and prompts

func ProvideUIService

func ProvideUIService() Service

ProvideUIService creates a new UI service @Provider

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

Spinner handles animated loading indicators

func NewSpinner

func NewSpinner() *Spinner

func (*Spinner) Start

func (s *Spinner) Start(message string)

func (*Spinner) Stop

func (s *Spinner) Stop(message string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL