utils

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StrToInt = map[string]int{
	"0": 0,
	"1": 1,
	"2": 2,
	"3": 3,
	"4": 4,
	"5": 5,
	"6": 6,
	"7": 7,
	"8": 8,
	"9": 9,
}

String to int

Functions

func InputPrompt added in v0.0.5

func InputPrompt(text string) string

func Multiline

func Multiline(line ...string) string

Functions

func ReadDirectory

func ReadDirectory(dir string, n int) ([]string, error)

func SimilarityScore added in v0.0.6

func SimilarityScore(s1, s2 string) int

func ValidateDirectory

func ValidateDirectory(path string) (string, error)

func ValidateFile added in v0.0.6

func ValidateFile(path string) (string, error)

Functions

Types

type DirPathFlag added in v0.0.6

type DirPathFlag string

Directory Path Flag

func (*DirPathFlag) Set added in v0.0.6

func (e *DirPathFlag) Set(value string) error

func (*DirPathFlag) String added in v0.0.6

func (e *DirPathFlag) String() string

func (*DirPathFlag) Type added in v0.0.6

func (e *DirPathFlag) Type() string

type FilePathFlag added in v0.0.6

type FilePathFlag string

File Path Flag

func (*FilePathFlag) Set added in v0.0.6

func (e *FilePathFlag) Set(value string) error

func (*FilePathFlag) String added in v0.0.6

func (e *FilePathFlag) String() string

func (*FilePathFlag) Type added in v0.0.6

func (e *FilePathFlag) Type() string

type PathFlag added in v0.0.6

type PathFlag string

Path Flag

func (*PathFlag) Set added in v0.0.6

func (e *PathFlag) Set(value string) error

func (*PathFlag) String added in v0.0.6

func (e *PathFlag) String() string

func (*PathFlag) Type added in v0.0.6

func (e *PathFlag) Type() string

type PositiveIntFlag added in v0.0.6

type PositiveIntFlag int

Positive Integer Flag

func (*PositiveIntFlag) Int added in v0.0.6

func (i *PositiveIntFlag) Int() int

func (*PositiveIntFlag) Set added in v0.0.6

func (i *PositiveIntFlag) Set(value string) error

func (*PositiveIntFlag) String added in v0.0.6

func (i *PositiveIntFlag) String() string

func (*PositiveIntFlag) Type added in v0.0.6

func (i *PositiveIntFlag) Type() string

type StrategyEnum added in v0.0.6

type StrategyEnum string

Strategy Enum

const (
	StrategySynchronous StrategyEnum = "synchronous"
	StrategyConcurrent  StrategyEnum = "concurrent"
)

func (*StrategyEnum) Set added in v0.0.6

func (e *StrategyEnum) Set(value string) error

func (*StrategyEnum) String added in v0.0.6

func (e *StrategyEnum) String() string

func (*StrategyEnum) Type added in v0.0.6

func (e *StrategyEnum) Type() string

Jump to

Keyboard shortcuts

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