cmd

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package cmd implements the CLI commands for go-berkshelf.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLockFileStatus

func CheckLockFileStatus(manager *lockfile.Manager, force bool) (shouldProceed bool, err error)

CheckLockFileStatus checks if the lock file exists and whether it's outdated

func CreateRequirementsFromCookbooks

func CreateRequirementsFromCookbooks(cookbooks []*berksfile.CookbookDef) []*resolver.Requirement

CreateRequirementsFromCookbooks creates resolver requirements from cookbook definitions

func CreateSourceManager

func CreateSourceManager(bf *berksfile.Berksfile) (*source.Manager, error)

CreateSourceManager creates a source manager from a parsed Berksfile

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately.

func LoadBerksfile

func LoadBerksfile() (*berksfile.Berksfile, error)

LoadBerksfile loads and parses the Berksfile from the current directory

func LoadLockFile

func LoadLockFile() (*lockfile.LockFile, *lockfile.Manager, error)

LoadLockFile loads the lock file from the current directory

func ResolveDependencies

func ResolveDependencies(ctx context.Context, requirements []*resolver.Requirement, sources []source.CookbookSource) (*resolver.Resolution, error)

ResolveDependencies resolves cookbook dependencies and handles errors

func SetupSourcesFromBerksfile

func SetupSourcesFromBerksfile(berks *berksfile.Berksfile) (*source.Manager, error)

SetupSourcesFromBerksfile sets up the source manager with sources from the Berksfile

Types

type CommonFlags

type CommonFlags struct {
	Only   []string
	Except []string
}

CommonFlags holds flags that are used across multiple commands

type CookbookListItem

type CookbookListItem struct {
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Source       string            `json:"source"`
	Dependencies map[string]string `json:"dependencies,omitempty"`
}

Jump to

Keyboard shortcuts

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