Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

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

License

Notifications You must be signed in to change notification settings

uechoco/go-must

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Packages

No packages published

Languages