package cmd

import "github.com/open-policy-agent/opa/cmd"

Package cmd contains the entry points for OPA commands.

Index

Variables

var RootCommand = &cobra.Command{
	Use:   path.Base(os.Args[0]),
	Short: "Open Policy Agent (OPA)",
	Long:  "An open source project to policy-enable your service.",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {

		message, fatal := deprecation.CheckWarnings(os.Environ(), cmd.Use)
		if message != "" {
			cmd.PrintErr(message)
			if fatal {
				os.Exit(1)
			}
		}

	},
}

RootCommand is the base CLI command that all subcommands are added to.

Source Files

bench.go build.go capabilities.go check.go commands.go deps.go doc.go eval.go exec.go filters.go flags.go fmt.go inspect.go oracle.go parse.go refactor.go run.go sign.go test.go version.go

Directories

PathSynopsis
cmd/internal
Version
v0.57.1
Published
Oct 18, 2023
Platform
linux/amd64
Imports
72 packages
Last checked
38 minutes ago

Tools for package owners.