policy

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 4 Imported by: 0

README

policy example

Two leaf subcommands exercise policy.ValidateArgSlice, the shell-metacharacter argv gate. Same gate that verb.Wrap and passthrough.Command install by default.

$ go run ./examples/policy safe hello
accepted: [hello]
$ go run ./examples/policy unsafe 'foo; rm -rf /'
rejected: positional[0]: shell metacharacter ';' refused

Documentation

Overview

Command policy demonstrates argv-validation rejection.

Jump to

Keyboard shortcuts

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