parser

package
v0.0.0-...-07eafe9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package parser 文档内容分析

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser 文档分析对象

func New

func New(l *logger.Logger, prefix string, tags []string) *Parser

New 声明 Parser 对象

prefix 为所有的 API 地址加上统一的前缀; tags 如果非空,则表示仅返回带这些标签的 API;

func (*Parser) AddDir

func (p *Parser) AddDir(ctx context.Context, root string, recursive bool)

AddDir 添加 root 下的内容

仅在调用 Parser.Parse 之前添加有效果。 root 添加的目录;

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context) *openapi.OpenAPI

Parse 解析由 Parser.AddDir 加载的内容

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL