question

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnsweredCount

func AnsweredCount(questions []Question) int

func BuildResumePrompt

func BuildResumePrompt(questions []Question, followUp string) string

func FormatAskLog

func FormatAskLog(q Question) string

func FormatReplayLog

func FormatReplayLog(q Question) string

func HasUnanswered

func HasUnanswered(questions []Question) bool

func PendingIndex

func PendingIndex(questions []Question, selected int) int

func ReadQuestions

func ReadQuestions(r io.Reader, ch chan<- Question)

Types

type Entry

type Entry struct {
	Type     string   `json:"type"`
	ID       string   `json:"id"`
	Question string   `json:"question,omitempty"`
	Options  []Option `json:"options,omitempty"`
	Answer   string   `json:"answer,omitempty"`
}

type Option

type Option struct {
	Label       string `json:"label"`
	Description string `json:"description,omitempty"`
}

type Question

type Question struct {
	ID       string   `json:"id"`
	Question string   `json:"question"`
	Options  []Option `json:"options"`
	Answer   string   `json:"answer,omitempty"`
}

func ReplayLines

func ReplayLines(lines []string) []Question

Jump to

Keyboard shortcuts

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