Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages