utils

package
v0.0.0-...-fa8ef61 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2015 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DocsJsPath string
	HvJsPath   string
)

Functions

func FormatCode

func FormatCode(w io.Writer, code *string, links []*Link)

FormatCode highlights keywords and adds HTML links to them.

func IsDocFile

func IsDocFile(n string) bool

func LoadConfig

func LoadConfig(cfgPath string)

LoadConfig loads configuration file.

func SaveConfig

func SaveConfig() error

SaveConfig saves configuration file.

func SaveDocPage

func SaveDocPage(docPath string, data []byte) int

SaveDocPage saves doc. content to JS file(s), it returns max index of JS file(s); it returns -1 when error occurs.

func SavePkgDoc

func SavePkgDoc(docPath string, readmes map[string][]byte)

SavePkgDoc saves readered readme.md file data.

Types

type Link struct {
	Path, Name, Comment string // package path, identifier name, and comments.
}

A link describes the (HTML) link information for an identifier. The zero value of a link represents "no link".

Jump to

Keyboard shortcuts

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