github.com/stretchr/testify is a useful library for doing assertion in tests. It makes assertions in test more less verbose and more comfortable to read and use.
		
			
				
	
	
		
			10 lines
		
	
	
		
			268 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			268 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package require
 | |
| 
 | |
| // TestingT is an interface wrapper around *testing.T
 | |
| type TestingT interface {
 | |
| 	Errorf(format string, args ...interface{})
 | |
| 	FailNow()
 | |
| }
 | |
| 
 | |
| //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs
 |