package inputs
import "github.com/purpleidea/mgmt/lang/inputs"
Package inputs contains the input parsing logic for how mcl module entrypoints are handled for the language.
In other words, given a string, does this represent stdin, a specific metadata input file, a specific code file, a directory of code, some raw and inline code, or nothing at all.
Index ¶
Types ¶
type ParsedInput ¶
type ParsedInput struct { //activated bool // if struct is not nil we're activated FS engine.Fs // reference to the engine.Fs used to call the parse Base string // base path (abs path with trailing slash) Main []byte // contents of main entry mcl code Files []string // files and dirs to copy to fs (abs paths) Metadata *interfaces.Metadata Workers []func(engine.WriteableFS) error // copy files here that aren't listed! }
ParsedInput is the output struct which contains all the information we need.
func ParseInput ¶
func ParseInput(s string, fs engine.Fs) (*ParsedInput, error)
ParseInput runs the list if input parsers to know how to run the lexer, parser, and so on... The fs input is the source filesystem to look in.
func (*ParsedInput) String ¶
func (obj *ParsedInput) String() string
String adds a pretty-printing facility to make it easier to visualize these.
Source Files ¶
- Version
- v0.0.0-20250322185616-c50a578426f1 (latest)
- Published
- Mar 22, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 4 days ago –
Tools for package owners.