Sha256: 25e5daa025baa49c4aed1570f1a4fab8822e80d78c19e700c92413bf0c97dd1c

Contents?: true

Size: 788 Bytes

Versions: 16

Compression:

Stored size: 788 Bytes

Contents

package aws

import (
	"fmt"
)

// Ternary is an enum allowing an unknown or none state in addition to a bool's
// true and false.
type Ternary int

func (t Ternary) String() string {
	switch t {
	case UnknownTernary:
		return "unknown"
	case FalseTernary:
		return "false"
	case TrueTernary:
		return "true"
	default:
		return fmt.Sprintf("unknown value, %d", int(t))
	}
}

// Bool returns true if the value is TrueTernary, false otherwise.
func (t Ternary) Bool() bool {
	return t == TrueTernary
}

// Enumerations for the values of the Ternary type.
const (
	UnknownTernary Ternary = iota
	FalseTernary
	TrueTernary
)

// BoolTernary returns a true or false Ternary value for the bool provided.
func BoolTernary(v bool) Ternary {
	if v {
		return TrueTernary
	}
	return FalseTernary
}

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.2.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.1.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.1.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.0.2 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.0.1 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go
ruby_snowflake_client-1.0.0 ext/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go