1//go:build crashtest23package ui45import (6 "os"78 tea "charm.land/bubbletea/v2"9)1011// In builds tagged crashtest (the e2e tests' binary), F12 makes the12// program panic where O12_CRASH_TEST says: "update", "view" or13// "command". Release builds have no such key.14func init() {15 where := os.Getenv("O12_CRASH_TEST")16 crashTest = func(msg tea.Msg) string {17 if k, ok := msg.(tea.KeyPressMsg); ok && k.String() == "f12" {18 return where19 }20 return ""21 }22}