parse

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParamsType *reflect.Type

Functions

func GetDescription

func GetDescription(longFnName string) (desc string)

func GetTitle

func GetTitle(longFnName string) string

GetTitle extracts a title from the function name, where longFnName is of the form: github.com/adams-sarah/test2doc/example.GetWidget and the out title would be: Handle Get Widget

func IsFuncInPkg

func IsFuncInPkg(longFnName string) bool

IsFuncInPkg checks if this func belongs to the package

func NewPackageDoc

func NewPackageDoc(dir string) (*doc.Package, error)

NewPackageDoc retrieves the go/doc package for the given dir

func SetParamsType

func SetParamsType(paramsType *reflect.Type)

func SetURLVarExtractor

func SetURLVarExtractor(fn *URLVarExtractor)

Types

type URLVarExtractor

type URLVarExtractor func(req *http.Request) (vars map[string]string)
var Extractor *URLVarExtractor

Jump to

Keyboard shortcuts

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