Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 709 Bytes

README.md

File metadata and controls

27 lines (20 loc) · 709 Bytes

Go Reference Go Report Card

go-must

general utilities for "Must" pattern. It simplifies safe initialization, handling errors in test, and so on.

Installation

This package uses generics, so you need to use Go 1.18 or later.

go get github.com/uechoco/go-must

Example Usage

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)
}