本文整理匯總了Golang中github.com/getgauge/gauge/parser.ConceptParser類的典型用法代碼示例。如果您正苦於以下問題:Golang ConceptParser類的具體用法?Golang ConceptParser怎麽用?Golang ConceptParser使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ConceptParser類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: onConceptFileModify
func (s *SpecInfoGatherer) onConceptFileModify(file string) {
logger.ApiLog.Info("Concept file added / modified: %s", file)
conceptParser := new(parser.ConceptParser)
concepts, parseResults := conceptParser.ParseFile(file)
if parseResults != nil && parseResults.Error != nil {
logger.ApiLog.Error("Error parsing concepts: ", parseResults.Error)
return
}
for _, concept := range concepts {
c := parser.Concept{concept, file}
s.addToConceptsCache(file, &c)
stepsFromConcept := s.getStepsFromConcept(&c)
s.addToStepsCache(stepsFromConcept)
}
}
示例2: onConceptFileModify
func (s *SpecInfoGatherer) onConceptFileModify(file string) {
s.waitGroup.Add(1)
defer s.waitGroup.Done()
logger.APILog.Info("Concept file added / modified: %s", file)
conceptParser := new(parser.ConceptParser)
concepts, parseResults := conceptParser.ParseFile(file)
if parseResults != nil && parseResults.Error != nil {
logger.APILog.Error("Error parsing concepts: ", parseResults.Error)
return
}
for _, concept := range concepts {
c := gauge.Concept{ConceptStep: concept, FileName: file}
s.addToConceptsCache(file, &c)
stepsFromConcept := getStepsFromConcept(&c)
s.addToStepsCache(stepsFromConcept)
}
}