- Go 98.5%
- Go Template 1.5%
Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.4 to 2.3.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pelletier/go-toml/releases">github.com/pelletier/go-toml/v2's releases</a>.</em></p> <blockquote> <h2>v2.3.0</h2> <p>This is the first release built largely with the help of AI coding agents. Highlights include the complete removal of the unsafe package. go-toml is now fully safe Go code, with a geomean overhead of only ~1.4% vs v2.2.4 and zero additional allocations on benchmarks. This release also adds omitzero struct tag support, improves UnmarshalText/Unmarshaler handling for tables and array tables, and fixes several bugs including nil pointer marshaling, leap second handling, and datetime unmarshaling panics.</p> <!-- raw HTML omitted --> <h2>What's Changed</h2> <h3>What's new</h3> <ul> <li>marshal: don't escape quotes unnecessarily by <a href="https://github.com/virtuald"><code>@virtuald</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/991">pelletier/go-toml#991</a></li> <li>Add <code>omitzero</code> tag support by <a href="https://github.com/NathanBaulch"><code>@NathanBaulch</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/998">pelletier/go-toml#998</a></li> <li>Support custom IsZero() methods with omitzero tag by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1020">pelletier/go-toml#1020</a></li> <li>UnmarshalText fallbacks to struct unmarshaling for tables and arrays by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1026">pelletier/go-toml#1026</a></li> <li>[unstable] Support Unmarshaler interface for tables and array tables by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1027">pelletier/go-toml#1027</a></li> </ul> <h3>Fixed bugs</h3> <ul> <li>Add missing UnmarshalTOML call by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/996">pelletier/go-toml#996</a></li> <li>Handle array table into an empty slice by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/997">pelletier/go-toml#997</a></li> <li>Unwrap strict errors by <a href="https://github.com/bersace"><code>@bersace</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1012">pelletier/go-toml#1012</a></li> <li>Fix leap second handling found by fuzz by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1019">pelletier/go-toml#1019</a></li> <li>Fix nil pointer map values not being marshaled by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1025">pelletier/go-toml#1025</a></li> <li>Fix panic when unmarshaling datetime values to incompatible types (<a href="https://redirect.github.com/pelletier/go-toml/issues/1028">#1028</a>) by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1029">pelletier/go-toml#1029</a></li> <li>Fix parser error pointing to wrong line at EOF without trailing newline by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1041">pelletier/go-toml#1041</a></li> </ul> <h3>Documentation</h3> <ul> <li>Improve Unmarshaling README by <a href="https://github.com/heckelson"><code>@heckelson</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1016">pelletier/go-toml#1016</a></li> <li>Create AGENTS.md guidelines file by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1017">pelletier/go-toml#1017</a></li> </ul> <h3>Other changes</h3> <ul> <li>Unsafe package removal by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1021">pelletier/go-toml#1021</a></li> <li>Bump CI and test scripts to Go 1.26 by <a href="https://github.com/pelletier"><code>@pelletier</code></a> in <a href="https://redirect.github.com/pelletier/go-toml/pull/1030">pelletier/go-toml#1030</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/virtuald"><code>@virtuald</code></a> made their first contribution in <a href="https://redirect.github.com/pelletier/go-toml/pull/991">pelletier/go-toml#991</a></li> <li><a href="https://github.com/NathanBaulch"><code>@NathanBaulch</code></a> made their first contribution in <a href="https://redirect.github.com/pelletier/go-toml/pull/999">pelletier/go-toml#999</a></li> <li><a href="https://github.com/bersace"><code>@bersace</code></a> made their first contribution in <a href="https://redirect.github.com/pelletier/go-toml/pull/1012">pelletier/go-toml#1012</a></li> <li><a href="https://github.com/flyn-org"><code>@flyn-org</code></a> made their first contribution in <a href="https://redirect.github.com/pelletier/go-toml/pull/1013">pelletier/go-toml#1013</a></li> <li><a href="https://github.com/heckelson"><code>@heckelson</code></a> made their first contribution in <a href="https://redirect.github.com/pelletier/go-toml/pull/1016">pelletier/go-toml#1016</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0">https://github.com/pelletier/go-toml/compare/v2.2.4...v2.3.0</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|---|---|---|
| .claude | ||
| .github | ||
| cmd | ||
| docs | ||
| exam | ||
| qti | ||
| question | ||
| scantron | ||
| testdata | ||
| AGENTS.md | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| README.md | ||
question bank
Write exam and quiz questions in a structured "question bank" format, then convert them to an exam or solutions sheet.
Each question is a TOML file, a bank is a collection of TOML files, and each exam is a TOML file that references the questions in a bank. Exams are rendered to PDF by inserting the questions into a LaTeX template and compiling it.
Quick demo (with example questions):
go run . --bank testdata/bank render-bank
go run . --bank testdata/bank render testdata/exams/exam.toml
Getting started with a coding agent
This tool is designed to be easy to use with LLMs, which can quickly convert your existing questions to question-bank's toml files.
First install the binary:
go install github.com/tchajed/question-bank@latest
If you have a Google Doc, you can download it as markdown, which works quite reliably. There are various tools to convert a Word docx to markdown. You can also import a PDF, but it will take more time and tokens. Then, just use a version of this prompt in a coding agent (like Claude Code or Codex - you need it to be able to call the tool):
Run `question-bank docs --prompt` for instructions. Then import @midterm1.md to `./bank`.
You can then render the exam and double-check everything (the coding agent can figure out how to do this for you from the CLI --help output).
Questions
Here's a quick example of what a question TOML file looks like:
stem = """
Which of these is **not** an application benefit of an operating system?
"""
choices = [
{text = 'A set of simpler abstractions against which to program'},
{text = 'Independence from specific hardware and devices'},
{text = 'More control over how hardware is used', correct = true},
]
explanation = """
An operating system gives less direct control over the hardware to applications.
"""
topic = 'os'
difficulty = 'easy'
tags = []
Read the question format reference for a complete guide.
Exams (and quizzes and homeworks)
An exam (or other assessment) has some metadata and questions, listed by IDs in the question bank. Defaults can be factored out to a separate file, for several exams in the same course (this is particularly useful for the LaTeX cover page, not shown in the example below).
course_code = "CS 537"
title = "Midterm 1"
semester = "Spring 2026"
[[sections]]
name = "Operating Systems"
questions = ["os-001", "processes-group-001/1", "processes-group-001/2"]
[[sections]]
name = "Virtual Memory"
questions = ["vm-001", "vm-002"]
Exams can be exported to a QTI zip file that can be imported into Canvas (using Settings > Import Course Content):
go run . --bank testdata/bank canvas testdata/exams/exam.toml