···4455
6677-")
77+")
8899## Installation
1010···1515## Usage
16161717```go
1818-package yourpackage_test
1818+package package_test
19192020func TestSomething(t *testing.T) {
2121 result := SomeFunction("foo")
2222 freeze.Snap(t, result)
2323-2424- // To capture the calling function name use SnapFunc
2525- freeze.SnapFunc(t, SomeFunction("bar"))
2623}
2724```
2825···3229go run github.com/ptdewey/freeze/cmd/freeze review
3330```
34313535-<!-- TODO: add example of `freeze.Review()` in go code -->
3232+Freeze can also be used programmatically:
3333+3434+```go
3535+// Example: tools/freeze/main.go
3636+package main
36373737-Freeze also includes (in a separate Go module) a [Bubbletea](https://github.com/charmbracelet/bubbletea) TUI in [cmd/tui/main.go](./cmd/tui/main.go). (The TUI is shipped in a separate module to make the added dependencies optional)
3838+import "github.com/ptdewey/freeze"
3939+4040+func main() {
4141+ // This will start the CLI review tool
4242+ freeze.Review()
4343+}
4444+```
4545+4646+Which can then be run with:
4747+4848+```sh
4949+go run tools/freeze/main.go
5050+```
5151+5252+Freeze also includes (in a separate Go module) a [Bubbletea](https://github.com/charmbracelet/bubbletea) TUI in [cmd/tui/main.go](./cmd/tui/main.go).
5353+(The TUI is shipped in a separate module to make the added dependencies optional)
38543955### TUI Usage
4056