doc

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TYPE_NODEF      = 0
	TYPE_COMMENT    = 1
	TYPE_CODE       = 2
	TYPE_FUNCTION   = 3
	TYPE_TYPEDEF    = 4
	TYPE_MACROCONST = 5
	TYPE_MACROFUNC  = 6
	TYPE_CONST      = 7
	TYPE_CLASS      = 8
	TYPE_VAR        = 9
)

Variables

View Source
var Title string = ""

Functions

func ReadDebug

func ReadDebug(roots []string)

Read files in debug mode

Types

type DataIndex

type DataIndex struct {
	List  Index
	Files []string
	Date  string
}

The index for XML and JSON encoding

func (*DataIndex) Json

func (ind *DataIndex) Json(path string)

Save the data in a file in JSON encoding

func (*DataIndex) Xml

func (ind *DataIndex) Xml(path string)

Save the data in a file in JSON encoding

type Element

type Element struct {
	// The name of the element
	Name string
	// The header of the element
	LineName string
	// The type: func, var, const, class ...
	Type string
	// The file where are the definition of the element
	FileName string
	// The line of the definition in the file
	LineNum int
	// The comment before the element. Each item is a paragraph.
	Comment []string
	// The language of the file
	Lang string
}

On element: function, var, typedef, class ...

type Index

type Index []*Element

All the element of a project

func Read

func Read(root string) (ind *Index)

Read a file or a directory

func (*Index) DataIndex

func (ind *Index) DataIndex() *DataIndex

Cast Index to DataIndex

func (*Index) Date

func (ind *Index) Date() string

Get the time of the parse for use with JSON

func (*Index) HumainDate

func (_ *Index) HumainDate() string

Get the date for humain

func (Index) ListFile

func (ind Index) ListFile() (files []string)

List all file who have an element of the list. The return list are sorted and all file are uniq

func (Index) ListLang

func (ind Index) ListLang() (out []string)

List all file who have an element of the list. The return list are sorted and all file are uniq

func (Index) ListType

func (ind Index) ListType() (files []string)

List all file who have an element of the list. The return list are sorted and all file are uniq

func (*Index) SaveHTML

func (ind *Index) SaveHTML(path string)

Save the index in a a file in html

func (*Index) Title

func (_ *Index) Title() string

Get the Title for <h1> in template

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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