firstrun

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: May 26, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndRun

func CheckAndRun(options *FirstRunOptions) error

CheckAndRun checks if the first-run wizard should run and runs it if needed

func HasRun

func HasRun() bool

HasRun returns whether the first-run wizard has been run before

func MarkAsRun

func MarkAsRun() error

MarkAsRun marks the first-run wizard as having been run

func ResetFirstRun

func ResetFirstRun() error

ResetFirstRun resets the first-run state, causing the wizard to run again

func RunFirstTimeSetup

func RunFirstTimeSetup(configPath string, nonInteractive bool) error

RunFirstTimeSetup runs the first-time setup process

Types

type FirstRun

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

FirstRun represents the first-run wizard

func NewFirstRun

func NewFirstRun(options *FirstRunOptions) *FirstRun

NewFirstRun creates a new first-run wizard

func (*FirstRun) Run

func (f *FirstRun) Run() error

Run runs the first-run wizard

func (*FirstRun) ShouldRun

func (f *FirstRun) ShouldRun() bool

ShouldRun returns whether the first-run wizard should run

type FirstRunOptions

type FirstRunOptions struct {
	// ConfigPath is the path to the configuration file
	ConfigPath string

	// Force forces the first-run wizard to run even if it has run before
	Force bool

	// NonInteractive disables interactive mode
	NonInteractive bool

	// SkipAuth skips the authentication step
	SkipAuth bool

	// SkipDisplay skips the display settings step
	SkipDisplay bool

	// SkipNotifications skips the notification settings step
	SkipNotifications bool

	// SkipAdvanced skips the advanced settings step
	SkipAdvanced bool

	// Theme sets the color theme
	Theme string

	// NoColor disables color output
	NoColor bool
}

FirstRunOptions contains options for the first-run wizard

func DefaultFirstRunOptions

func DefaultFirstRunOptions() *FirstRunOptions

DefaultFirstRunOptions returns the default first-run options

Jump to

Keyboard shortcuts

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