This commit is contained in:
anqiansong
2021-05-13 18:42:05 +08:00
committed by GitHub
parent ea01cc78f0
commit 9f6a574f97
4 changed files with 37 additions and 16 deletions

View File

@@ -34,9 +34,9 @@ func Parse(filename string) (*spec.ApiSpec, error) {
}
// ParseContent parses the api content
func ParseContent(content string) (*spec.ApiSpec, error) {
func ParseContent(content string, filename ...string) (*spec.ApiSpec, error) {
astParser := ast.NewParser()
ast, err := astParser.ParseContent(content)
ast, err := astParser.ParseContent(content, filename...)
if err != nil {
return nil, err
}