github.com/TIBCOSoftware/flogo-lib@v0.5.9/core/mapper/exprmapper/function/string/equals/equals.go (about) 1 package equals 2 3 import ( 4 "github.com/TIBCOSoftware/flogo-lib/core/mapper/exprmapper/expression/function" 5 "github.com/TIBCOSoftware/flogo-lib/logger" 6 ) 7 8 var log = logger.GetLogger("equals-function") 9 10 type Equals struct { 11 } 12 13 func init() { 14 function.Registry(&Equals{}) 15 } 16 17 func (s *Equals) GetName() string { 18 return "equals" 19 } 20 21 func (s *Equals) GetCategory() string { 22 return "string" 23 } 24 func (s *Equals) Eval(str, str2 string) bool { 25 log.Debugf(`Reports whether "%s" equals "%s" `, str, str2) 26 return str == str2 27 }