Simple tests for whether a value is empty.
lib
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matt Skinner f8d9bd00bf Fix typo. 1 year ago
public Add new directory 1 year ago
.drone.yml Re-adding drone.yml file. 1 year ago
.gitignore Initial commit. 3 years ago
.gitlab-ci.yml Added gitlab-ci config. 1 year ago
LICENSE Added license. 3 years ago
README.md Added gitlab-ci config. 1 year ago
empty.go Removing empty handler package for simplicity. 1 year ago
empty_test.go Fix import paths. 1 year ago
go.mod Fix typo. 1 year ago
go.sum Removing empty handler package for simplicity. 1 year ago
time.go Removing empty handler package for simplicity. 1 year ago
time_test.go Fix import paths. 1 year ago

README.md

pipeline status coverage report

Coverage Report

Determine whether a library is empty or not. Built-in types are handles as follow. Use the Empty interface to extend functionality.

A value is empty if:

  • 0 for integers of any type (e.g. int, int8…etc)
  • 0.0 for floats of any type (e.g. float32, float 64)
  • maps without any keys
  • arrays with length of zero where each element satisfies its type specific empty criteria