gitlab.com/evatix-go/core@v1.3.55/conditional/BoolFunctionsByOrder.go (about)

     1  package conditional
     2  
     3  // BoolFunctionsByOrder returns the first func which is true and don't execute others.
     4  func BoolFunctionsByOrder(
     5  	boolFunctions ...func() bool,
     6  ) bool {
     7  	for _, f := range boolFunctions {
     8  		if f() {
     9  			return true
    10  		}
    11  	}
    12  
    13  	return false
    14  }