github.com/Aoi-hosizora/ahlib@v1.5.1-0.20230404072829-241b93cf91c7/xcondition/README.md (about)

     1  # xcondition
     2  
     3  ## Dependencies
     4  
     5  + xreflect
     6  + (xtesting)
     7  
     8  ## Documents
     9  
    10  ### Types
    11  
    12  + None
    13  
    14  ### Variables
    15  
    16  + None
    17  
    18  ### Constants
    19  
    20  + None
    21  
    22  ### Functions
    23  
    24  + `func IfThen(condition bool, value interface{}) interface{}`
    25  + `func IfThenElse(condition bool, value1, value2 interface{}) interface{}`
    26  + `func If(cond bool, v1, v2 interface{}) interface{}`
    27  + `func DefaultIfNil(value, defaultValue interface{}) interface{}`
    28  + `func PanicIfNil(value interface{}, panicValue ...interface{}) interface{}`
    29  + `func Un(v interface{}) interface{}`
    30  + `func Unp(v, panicV interface{}) interface{}`
    31  + `func PanicIfErr(value interface{}, err error) interface{}`
    32  + `func PanicIfErr2(value1, value2 interface{}, err error) (interface{}, interface{})`
    33  + `func PanicIfErr3(value1, value2, value3 interface{}, err error) (interface{}, interface{}, interface{})`
    34  + `func Ue(v interface{}, err error) interface{}`
    35  + `func Ue2(v1, v2 interface{}, err error) (interface{}, interface{})`
    36  + `func Ue3(v1, v2, v3 interface{}, err error) (interface{}, interface{}, interface{})`
    37  + `func Let(t interface{}, f func(interface{}) interface{}) interface{}`
    38  + `func NillableLet(value interface{}, f func(interface{}) interface{}) interface{}`
    39  + `func First(args ...interface{}) interface{}`
    40  + `func Second(args ...interface{}) interface{}`
    41  + `func Third(args ...interface{}) interface{}`
    42  + `func Last(args ...interface{}) interface{}`
    43  
    44  ### Methods
    45  
    46  + None