create

package
v0.0.1-0...-4a2c530 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package create implements the infractl create command.

Index

Constants

This section is empty.

Variables

View Source
var (
	// GetRootDir runs a command to determine the top level git repository and
	// is exported so that its behavior can be overriden by a test.
	GetRootDir = func() string {
		topLevel := exec.Command("git", "rev-parse", "--show-toplevel")
		out, _ := topLevel.Output()
		return strings.TrimSpace(string(out))
	}

	// GetMakeTag runs a command to determine the make tag and
	// is exported so that its behavior can be overriden by a test.
	GetMakeTag = func(rootDir string) string {
		makeTag := exec.Command("make", "--quiet", "tag")
		makeTag.Dir = rootDir
		out, _ := makeTag.Output()
		return strings.TrimSpace(string(out))
	}
)

Functions

func Command

func Command() *cobra.Command

Command defines the handler for infractl create.

Types

This section is empty.

Jump to

Keyboard shortcuts

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