utils

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LookupStringFlagOpt returns a string flag from the [cli.Context] as an [O.Option[string]]
	LookupStringFlagOpt = F.Flip(F.Flow2(
		getGetString,
		Reflow1[string](fromNonEmptyString),
	))
)

Functions

func LookupStringFlag

func LookupStringFlag(name string) func(ctx *cli.Context) string

LookupStringFlag returns a string flag from the cli.Context as a string

func LookupStringSliceFlag

func LookupStringSliceFlag(name string) func(ctx *cli.Context) []string

LookupStringSliceFlag returns a string flag from the cli.Context as a []string

func Reflow

func Reflow[T0, T1, R any](f func(T1) R) func(func(T0) T1) func(T0) R

func Reflow1

func Reflow1[T0, T1, R any](f1 func(T1) R) func(func(T0) T1) func(T0) R

func Reflow2

func Reflow2[T0, T1, R any](f func(T1) R) func(func(T0) T1) func(T0) R

func RunIOEither

func RunIOEither[T any](cmd IOE.IOEither[error, T]) error

RunIOEither executes an [IOE.IOEither], ignores the return value and only dispatches the error

Types

This section is empty.

Jump to

Keyboard shortcuts

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