https://github.com/sirkon/testlog
Logging of sirkon/errors in tests.
https://github.com/sirkon/testlog
Last synced: 3 months ago
JSON representation
Logging of sirkon/errors in tests.
- Host: GitHub
- URL: https://github.com/sirkon/testlog
- Owner: sirkon
- License: mit
- Created: 2022-06-27T10:27:33.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-19T07:33:32.000Z (over 2 years ago)
- Last Synced: 2024-04-17T21:14:26.669Z (about 1 year ago)
- Language: Go
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# testlog
Logging of [sirkon/errors](https://github.com/sirkon/errors) in tests, including context.## Installation
```shell
go get github.com/sirkon/errors
```## Usage
Just use helper functions:
```go
testlog.Log(t, errors.New("log entry"))
testlog.Error(t, errors.New("some serious error"))
```or
```go
tl := testlog.New(t)
tl.Log(errors.New("log entry"))
tl.Error(errors.New("som serious error"))
```## PS
Tests are meant to fail in this module.