Documentation
¶
Overview ¶
Package stream parses stdin for XML context-update tags and dispatches them for processing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractAttribute ¶
ExtractAttribute extracts a named attribute from an XML tag string.
Parameters:
- tag: XML tag string to search (e.g., `<context-update type="task">`)
- attrName: Attribute name to extract (e.g., "type")
Returns:
- string: Attribute value, or empty string if not found
func ProcessStream ¶
ProcessStream reads from a stream and applies context updates.
Scans input line-by-line looking for <context-update> XML tags. When found, parses the type and content, then either displays what would happen (dry-run) or applies the update.
Parameters:
- cmd: Cobra command for output
- reader: Input stream to scan (stdin or log file)
- dryRun: If true, show what would happen without applying
Returns:
- error: Non-nil if a read error occurs
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.