Documentation
¶
Overview ¶
Package lore는 git commit 트레일러 기반의 의사결정 지식 관리를 제공한다.
Index ¶
- func BuildCommit(entry *LoreEntry, message string) (string, error)
- func FormatTrailers(entry *LoreEntry) string
- type LoreConfig
- type LoreEntry
- func ParseTrailers(commitMsg string) (*LoreEntry, error)
- func QueryConstraints(dir string) ([]LoreEntry, error)
- func QueryContext(dir, path string) ([]LoreEntry, error)
- func QueryDirectives(dir string) ([]LoreEntry, error)
- func QueryRejected(dir string) ([]LoreEntry, error)
- func QueryStale(dir string, days int) ([]LoreEntry, error)
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCommit ¶
BuildCommit는 LoreEntry와 메시지로 git commit 메시지를 생성한다.
func FormatTrailers ¶
FormatTrailers는 LoreEntry를 트레일러 형식 문자열로 변환한다.
Types ¶
type LoreConfig ¶
type LoreConfig struct {
RequiredTrailers []string // 필수 트레일러 목록
StaleThresholdDays int // 오래된 항목 기준 (일)
}
LoreConfig는 Lore 설정이다.
type LoreEntry ¶
type LoreEntry struct {
// 9개 트레일러 필드
Constraint string // 제약 사항
Rejected string // 거부된 대안
Confidence string // 신뢰도: low, medium, high
ScopeRisk string // 범위 리스크: local, module, system
Reversibility string // 되돌릴 수 있는 정도: trivial, moderate, difficult
Directive string // 지시사항
Tested string // 테스트된 항목
NotTested string // 테스트되지 않은 항목
Related string // 관련 항목
// 메타데이터 (git log에서 추출)
CommitHash string // 커밋 해시
CommitDate time.Time // 커밋 날짜
CommitMsg string // 커밋 메시지 (트레일러 제외)
FilePath string // 관련 파일 경로
}
LoreEntry는 하나의 Lore 의사결정 항목이다.
func ParseTrailers ¶
ParseTrailers는 git commit 메시지에서 Lore 트레일러를 파싱한다.
func QueryConstraints ¶
QueryConstraints는 Constraint 트레일러가 있는 Lore 항목을 반환한다.
func QueryContext ¶
QueryContext는 특정 파일 경로와 관련된 Lore 항목을 반환한다.
func QueryDirectives ¶
QueryDirectives는 Directive 트레일러가 있는 Lore 항목을 반환한다.
func QueryRejected ¶
QueryRejected는 Rejected 트레일러가 있는 Lore 항목을 반환한다.
type ValidationError ¶
ValidationError는 검증 오류이다.
func Validate ¶
func Validate(commitMsg string, config LoreConfig) []ValidationError
Validate는 커밋 메시지의 Lore 트레일러를 검증한다.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.