Skip to content

Commit

Permalink
Add Nothing (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Karn authored May 21, 2023
1 parent 823004f commit f910bd5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [5.18.0] - 2023-05-21
### Added
- typesext.Nothing & valuesext.Nothing for better clarity in generic params and values that represent struct{}. This will provide better code readability and intent.

## [5.17.2] - 2023-05-09
### Fixed
- Prematurely closing http.Response Body before error with it can be intercepted for ErrUnexpectedResponse.
Expand Down Expand Up @@ -46,7 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `timext.NanoTime` for fast low level monotonic time with nanosecond precision.

[Unreleased]: https://github.com/go-playground/pkg/compare/v5.17.2...HEAD
[Unreleased]: https://github.com/go-playground/pkg/compare/v5.18.0...HEAD
[5.18.0]: https://github.com/go-playground/pkg/compare/v5.17.2..v5.18.0
[5.17.2]: https://github.com/go-playground/pkg/compare/v5.17.1..v5.17.2
[5.17.1]: https://github.com/go-playground/pkg/compare/v5.17.0...v5.17.1
[5.17.0]: https://github.com/go-playground/pkg/compare/v5.16.0...v5.17.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pkg

![Project status](https://img.shields.io/badge/version-5.17.2-green.svg)
![Project status](https://img.shields.io/badge/version-5.18.0-green.svg)
[![Lint & Test](https://github.com/go-playground/pkg/actions/workflows/go.yml/badge.svg)](https://github.com/go-playground/pkg/actions/workflows/go.yml)
[![Coverage Status](https://coveralls.io/repos/github/go-playground/pkg/badge.svg?branch=master)](https://coveralls.io/github/go-playground/pkg?branch=master)
[![GoDoc](https://godoc.org/github.com/go-playground/pkg?status.svg)](https://pkg.go.dev/mod/github.com/go-playground/pkg/v5)
Expand Down
4 changes: 4 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package typesext

// Nothing indicates the absence of a value and is an alias to struct{}
type Nothing = struct{}
6 changes: 6 additions & 0 deletions values/values.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package valuesext

import typesext "github.com/go-playground/pkg/v5/types"

// Nothing is an instantiated value of type typesext.Nothing.
var Nothing = typesext.Nothing{}

0 comments on commit f910bd5

Please sign in to comment.