Documentation ¶
Overview ¶
Package lexer contains a simple lexer for dealing with command line arguments. This package is used to allow us to split strings that are meant to be turned into exec.Cmd into the args it understands. This should only take input from a controlled environment, as I did not attempt to prevent the myriad of possible injection attacks I'm sure can occur. This is for DevOps use where we are reading in files controlled by the engineers and peer reviewed, not for taking from some random user.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemType ¶
type ItemType int
ItemType describes the type of item being emitted by the Lexer. There are predefined ItemType(s) and the rest are defined by the user.
const ( // ItemUnknown indicates that the Item is an unknown. This should only happen on // a Item that is the zero type. ItemUnknown ItemType = iota // ItemWord indicates this is simply a word character in the line. ItemWord // ItemFlag indicates this word started with -- or -. It will not contain an = sign. ItemFlag // ItemFlagAndValue indicates this word started with a -- or - and has a = sign in it. ItemFlagAndValue // ItemErr indicates we had an error and the Value will be the output text. ItemErr // ItemEOL indicates we have reached the end of the line. ItemEOL )
Click to show internal directories.
Click to hide internal directories.