Skip to content

Commit d480043

Browse files
committed
docs: add comment explaining default case in buildForm
1 parent ca33a1a commit d480043

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

internal/policywizard/forms.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ func (m *Model) buildForm() *huh.Form {
200200
))
201201

202202
default:
203+
// Every step must have a form. If we reach here, a new step was
204+
// added without a matching case — show an empty form rather than crash.
203205
f = huh.NewForm(huh.NewGroup())
204206
}
205207

0 commit comments

Comments
 (0)