question

package
v0.0.211 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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