flags

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(s string) uint32

Hash is taking a string and convert.

Types

type Flag

type Flag struct {
	Disable    bool
	Rule       string
	Percentage int
	True       interface{} // Value if Rule applied, and in percentage
	False      interface{} // Value if Rule applied and not in percentage
	Default    interface{} // Value if Rule does not applied
}

Flag describe the fields of a flag.

func (Flag) String added in v0.6.0

func (f Flag) String() string

string display correctly a flag

func (*Flag) Value

func (f *Flag) Value(flagName string, user ffuser.User) interface{}

Value is returning the Value associate to the flag (True or False) based if the toggle apply to the user or not.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL