general utilities for "Must" pattern. It simplifies safe initialization, handling errors in test, and so on.
This package uses generics, so you need to use Go 1.18 or later.
go get github.com/uechoco/go-must
import (
"time"
"github.com/uechoco/go-must"
)
func TestExample(t *testing.T) {
tm := must.Get2(time.Parse(time.RFC3339, "2020-01-01T00:00:00Z"))
fmt.Println(tm)
}