internal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NoNestedModulesMsg = "no nested modules defined in current context"

Variables

This section is empty.

Functions

func ArgExactN

func ArgExactN(n int) func(c int) error

func ArgMaxN

func ArgMaxN(n int) func(c int) error

func ArgMinN

func ArgMinN(n int) func(c int) error

func ArgNone added in v0.0.2

func ArgNone() func(c int) error

func ArgRangeNM

func ArgRangeNM(n int, m int) func(c int) error

func ErrorWrappedEvaluateContext

func ErrorWrappedEvaluateContext() (models.NestContext, error)

ErrorWrappedEvaluateContext is a wrapper for the cmd package to remove repetitive boilerplate code. It returns the evaluated context or a preformatted error.

func GetApplicationMutex added in v0.0.2

func GetApplicationMutex() (internal.LockFile, error)

GetApplicationMutex is a wrapper function to get a git-nest lockfile at the project root directory.

func GetProjectRootFromCwd added in v0.0.2

func GetProjectRootFromCwd() (models.Path, error)

GetProjectRootFromCwd returns the project root directory, starting from the current directory.

func PrintUsage

func PrintUsage(cmd *cobra.Command, args []string) error

PrintUsage is a wrapper function around the default cobra.Command Usage() function.

func RunWrapper

func RunWrapper(run func(cmd *cobra.Command, args []string) error, validateArgCount ...func(c int) error) func(cmd *cobra.Command, args []string) error

RunWrapper wraps the function set for the 'Run' field in a cobra.Command. It takes a runner function and an argument count validation function. If the latter is not nil, it is executed first and checked for returned errors. If no errors were returned, the runner function is executed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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