github.com/anycable/anycable-go@v1.5.1/node_mocks/SessionMatcher.go (about) 1 package node_mocks 2 3 import ( 4 node "github.com/anycable/anycable-go/node" 5 ) 6 7 func SessionMatcher(expected *node.Session) func(actual interface{}) bool { 8 return func(actual interface{}) bool { 9 act, ok := actual.(*node.Session) 10 11 if !ok { 12 return false 13 } 14 15 return expected.GetID() == act.GetID() 16 } 17 }