...

Source file src/github.com/thoas/go-funk/short_if.go

Documentation: github.com/thoas/go-funk

     1  package funk
     2  
     3  func ShortIf(condition bool, a interface{}, b interface{}) interface{} {
     4  	if condition {
     5  		return a
     6  	}
     7  	return b
     8  }
     9  

View as plain text