Documentation
¶
Overview ¶
Package listfile reads the files of IDs and names that bulk commands take through --from-file, one entry per line.
Index ¶
Constants ¶
const MaxLen = 255
MaxLen is the longest entry, in characters, that Read accepts: the maxLength the Jamf Pro API spec declares for its name fields.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Value string
// Line is the entry's 1-based line in its file, or 0 when it was not
// read from a file.
Line int
}
Entry is one ID or name from a list file, or one given on the command line.
func Read ¶
Read returns the entries in the file at path, skipping a leading byte order mark, blank lines and #-comments. It refuses the whole file when a line cannot be an ID or a name, and the refusal names only the line.
func (Entry) Hidden ¶
Hidden reports whether messages must leave the entry's value out: true for an entry read from a file in an MCP child.
func (Entry) Hide ¶
Hide returns err, or for a hidden entry an error that keeps only err's exit code and hint.
func (Entry) Label ¶
Label names the entry in a message: its quoted value, or its line when the value is hidden.