mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 15:18:44 +05:00
Add GetRule function for RSRParsers
This commit is contained in:
committed by
Dan Christian Bogos
parent
1f684b5d1a
commit
8e1898e6c9
@@ -63,6 +63,17 @@ func NewRSRParsersMustCompile(parsersRules string, allFiltersMatch bool, rsrSepa
|
||||
// RSRParsers is a set of RSRParser
|
||||
type RSRParsers []*RSRParser
|
||||
|
||||
func (prsrs RSRParsers) GetRule() (out string) {
|
||||
for i, prsr := range prsrs {
|
||||
if i == 0 {
|
||||
out = prsr.Rules
|
||||
} else {
|
||||
out = out + utils.NestingSep + prsr.Rules
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (prsrs RSRParsers) Compile() (err error) {
|
||||
for _, prsr := range prsrs {
|
||||
if err = prsr.Compile(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user