tracking

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package tracking implements data types and operations for clarification tracking files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(path string) bool

FileExists checks if a file exists at the given path.

func SaveTrackingFile

func SaveTrackingFile(tf *TrackingFile, path string) error

SaveTrackingFile writes a TrackingFile to the given path as YAML.

Types

type Entry

type Entry struct {
	ID                string   `yaml:"id" json:"id"`
	CanonicalQuestion string   `yaml:"canonical_question" json:"canonical_question"`
	Variants          []string `yaml:"variants,omitempty" json:"variants,omitempty"`
	CurrentAnswer     string   `yaml:"current_answer" json:"current_answer"`
	Occurrences       int      `yaml:"occurrences" json:"occurrences"`
	FirstSeen         string   `yaml:"first_seen" json:"first_seen"`
	LastSeen          string   `yaml:"last_seen" json:"last_seen"`
	SprintsSeen       []string `yaml:"sprints_seen,omitempty" json:"sprints_seen,omitempty"`
	Status            string   `yaml:"status" json:"status"`
	ContextTags       []string `yaml:"context_tags,omitempty" json:"context_tags,omitempty"`
	Confidence        string   `yaml:"confidence" json:"confidence"`
	PromotedTo        string   `yaml:"promoted_to,omitempty" json:"promoted_to,omitempty"`
	PromotedDate      string   `yaml:"promoted_date,omitempty" json:"promoted_date,omitempty"`
}

Entry represents a single clarification entry in the tracking file.

func NewEntry

func NewEntry(id, question, answer, date string) *Entry

NewEntry creates a new Entry with the given ID, question, and answer.

type TrackingFile

type TrackingFile struct {
	Version     int     `yaml:"version" json:"version"`
	Created     string  `yaml:"created" json:"created"`
	LastUpdated string  `yaml:"last_updated" json:"last_updated"`
	Entries     []Entry `yaml:"entries" json:"entries"`
}

TrackingFile represents the root structure of a clarification tracking YAML file.

func LoadTrackingFile

func LoadTrackingFile(path string) (*TrackingFile, error)

LoadTrackingFile loads and parses a YAML tracking file from the given path.

func NewTrackingFile

func NewTrackingFile(created string) *TrackingFile

NewTrackingFile creates a new TrackingFile with default values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL