// FromInterface fills ms from an interface{} value obtained from LoadModule.
FromInterface fills ms from an interface{} value obtained from LoadModule.
// FromInterface fills ms from an interface {} value obtained from LoadModule .
func (mss *MatcherSets) FromInterface(matcherSets interface{}) error {
	for _, matcherSetIfaces := range matcherSets.([]map[string]interface{}) {
		var matcherSet MatcherSet
		for _, matcher := range matcherSetIfaces {
			connMatcher, ok := matcher.(ConnMatcher)
			if !ok {
				return fmt.Errorf("decoded module is not a ConnMatcher: %#v", matcher)
			}
			matcherSet = append(matcherSet, connMatcher)
		}
		*mss = append(*mss, matcherSet)
	}
	return nil
}
func ( mss * MatcherSets ) FromInterface ( matcherSets interface { } ) error { for _ , matcherSetIfaces := range matcherSets . ( [ ] map [ string ] interface { } ) { var matcherSet MatcherSet for _ , matcher := range matcherSetIfaces { connMatcher , ok := matcher . ( ConnMatcher ) if ! ok { return fmt . Errorf ( " " , matcher ) } matcherSet = append ( matcherSet , connMatcher ) } * mss = append ( * mss , matcherSet ) } return nil }
FromInterface fills ms from an interface{} value obtained from LoadModule.
FromInterface fills ms from an interface {} value obtained from LoadModule .