to-be.Go
Simple Go library determining the truthyness of strings, that is whether they indicate truey or falsy values.

Table of Contents
Introduction
to-be is a library providing facilities for determine whether the truthyness of strings. It implemented in several languages: to-be.Go is the Go implementation.
Terminology
The term "truthy" is an unhelpfully overloaded term in the programming world, insofar as it is used to refer to the notion of "truthyness" - whether something can be deemed to be interpretable as truth - and also the true side of that interpretation. In this library, the former interpretation is used, leaving us with the following terms:
- "truthy" - whether something can be can be deemed to be interpretable as having truth;
- "falsey" - whether an object can be deemed to be interpretable as being false;
- "truey" - whether an object can be deemed to be interpretable as being true;
For example, consider the following Go program:
package main
import (
to_be "github.com/synesissoftware/to-be.Go"
)
s1 := "no"
s2 := "True"
s3 := "orange"
// "no" is validly truthy, and is falsey
to_be.StringIsFalsey(s1) // true
to_be.StringIsTruey(s1) // false
to_be.StringIsTruthy(s1) // true
// "True" is validly truthy, and is truey
to_be.StringIsFalsey(s2) // false
to_be.StringIsTruey(s2) // true
to_be.StringIsTruthy(s2) // true
// "orange" is not validly truthy, and is neither falsey nor truey
to_be.StringIsFalsey(s3) // false
to_be.StringIsTruey(s3) // false
to_be.StringIsTruthy(s3) // false
Installation
import to_be "github.com/synesissoftware/to-be.Go"
Components
// Indicates that the given string, when trimmed, is classified as "truthy"
// and is deemed as "falsey".
func StringIsFalsey(s string) bool
// Indicates that the given string, when trimmed, is classified as "truthy"
// and is deemed as "truey".
func StringIsTruey(s string) bool
// Indicates that the given string, when trimmed, is classified as "truthy"
// and is deemed as "truey".
func StringIsTruthy(s string) bool
func Version() uint64
func VersionString() string
Examples
Examples are provided in the examples directory, along with a markdown description for each. A detailed list TOC of them is provided in EXAMPLES.md.
Where to get help
GitHub Page
Contribution guidelines
Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/to-be.Go.
Dependencies
Development/Testing Dependencies
License
to-be.Go is released under the 3-clause BSD license. See LICENSE for details.