Documentation
¶
Overview ¶
Package identifiers provides format detection and parsing for Linear identifiers.
This package handles recognition and parsing of:
- Issue identifiers (TEAM-123 format)
- Email addresses
- UUIDs
Issue Identifier Parsing ¶
Issue identifiers follow the format "TEAM-NUMBER" where TEAM is the team key and NUMBER is the issue number:
if identifiers.IsIssueIdentifier("CEN-123") {
team, num, err := identifiers.ParseIssueIdentifier("CEN-123")
// team = "CEN", num = "123"
}
Format Detection ¶
The package provides quick format detection functions:
identifiers.IsEmail("user@example.com") // true
identifiers.IsUUID("550e8400-e29b-41d4-...") // true
identifiers.IsIssueIdentifier("ENG-42") // true
These functions are used throughout the codebase to determine how to resolve user-provided identifiers to Linear UUIDs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmail ¶
IsEmail checks if a string is a valid email address
Why: Users can be identified by email, so we need to detect email format to route to the correct resolution method.
func IsIssueIdentifier ¶
IsIssueIdentifier checks if a string matches Linear's issue identifier format Valid format: UPPERCASE-NUMBER (e.g., CEN-123, ABC-1)
Why: Issue identifiers are the human-readable way to reference issues. We need to detect them to know when to resolve them to UUIDs internally.
func IsUUID ¶
IsUUID checks if a string is a UUID format UUIDs: 8-4-4-4-12 format (e.g., "550e8400-e29b-41d4-a716-446655440000")
Why: We need to detect UUIDs to avoid unnecessary resolution lookups. UUIDs can be used directly without resolution.
func ParseIssueIdentifier ¶
ParseIssueIdentifier extracts the team key and issue number from an identifier Returns the team key (e.g., "CEN"), the number (e.g., "123"), and any error
Exported in Phase 3 to eliminate duplication in service layer. Previously was unexported parseIssueIdentifier in helpers package.
Types ¶
This section is empty.