# README
LaunchDarkly Go Configuration Types
This project contains Go types and functions that are meant to simplify and standardize text-based configuration options. There is a basic set of types for strongly typed values with or without validation rules, which can be used with any text parsing code that recognizes the encoding.TextMarshaler interface. The same types can also be read from environment variables in a standard way.
This version of the module supports Go version 1.21 or higher.
For more information, see the package documentation.
Contributing
We encourage pull requests and other contributions from the community. Check out our contributing guidelines for instructions on how to contribute to this project.
About LaunchDarkly
- LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
- Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
- Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
- LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out our documentation for a complete list.
- Explore LaunchDarkly
- launchdarkly.com for more information
- docs.launchdarkly.com for our documentation and SDK reference guides
- apidocs.launchdarkly.com for our API documentation
- blog.launchdarkly.com for the latest product updates
- Feature Flagging Guide for best practices and strategies
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewVarReaderFromEnvironment creates a VarReader that reads from environment variables.
NewVarReaderFromValues creates a VarReader that reads from the specified name-value map.
StringOrElse is a shortcut for calling String() on a value if it is defined, or returning an alternative string if it is empty.
ValidateStruct checks whether all of a struct's exported fields are valid according to the tag-based required field rule.
# Structs
OptBase2Bytes represents an optional parameter which, if present, must be a valid units.Base2Bytes.
OptBool represents an optional boolean parameter.
OptDuration represents an optional time.Duration parameter.
OptDurationNonNegative represents an optional time.Duration parameter which, if defined, must be greater than or equal to zero.
OptFloat64 represents an optional float64 parameter.
OptInt represents an optional int parameter.
OptIntGreaterThanZero represents an optional int parameter which, if defined, must be greater than zero.
OptString represents an optional string parameter.
OptStringList represents an optional parameter that is a slice of string values.
OptStringNonEmpty represents an optional string parameter which, if defined, must be non-empty.
OptURL represents an optional parameter which, if present, must be a valid URL.
OptURLAbsolute represents an optional URL parameter which, if defined, must be an absolute URL.
ValidationError represents an invalid value condition for a parsed value or a struct field.
ValidationResult accumulates errors from field validation.
VarReader reads string values from named variables, such as environment variables, and translates them into values of any supported type.
# Interfaces
SingleValue is the common interface for all types in this package that represent a single optional or required value.
Validation is an optional interface for any type that you wish to have custom validation behavior when calling Validate(interface{}) or ValidateFields(interface{}).
# Type aliases
Error is a type tag for all errors returned by this package.
ValidationAggregateError is the type returned by ValidationResult.GetError() if there were multiple errors.
ValidationPath represents a field name or nested series of field names for a ValidationError.