cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintHelp

func PrintHelp()

Function to print the help message.

Types

type CloseChannel

type CloseChannel chan struct{}

Define the close channel type.

func NewCloseChannel

func NewCloseChannel() CloseChannel

Constructor like function to create a new close channel.

func (CloseChannel) Close

func (closeChannel CloseChannel) Close()

Function to close the close channel.

func (CloseChannel) IsClosed

func (closeChannel CloseChannel) IsClosed() bool

Function to check if the close channel is closed, unblocking.

type CommandLineOptions

type CommandLineOptions struct {
	Input         *string
	Level         *enumflag.EnumFlagValue[Level]
	HelpRequested *bool
}

Define the command line options struct.

func NewCommandLineOptions

func NewCommandLineOptions() CommandLineOptions

Constructor like function to create a new CommandLineOptions struct.

func (*CommandLineOptions) GetDifficultyOptions

func (options *CommandLineOptions) GetDifficultyOptions() generator.SudokuDifficulty

Function to create the difficulty options based on the command line flags.

func (*CommandLineOptions) Parse

func (options *CommandLineOptions) Parse()

Function to parse the command line flags.

type Level

type Level int

Define the Level enum type and identifiers.

const (
	Easy Level = iota
	Medium
	Hard
	Extreme
	Evil
)

Jump to

Keyboard shortcuts

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