Documentation ¶
Index ¶
Constants ¶
View Source
const ( AnalyzerFuncName = "T" MaxDepth = 5 )
Const values
Variables ¶
This section is empty.
Functions ¶
func SaveJSON ¶
func SaveJSON(w io.Writer, i18nrs I18NRecords) error
SaveJSON save I18NRecords as json without indent
func SaveJSONIndent ¶
func SaveJSONIndent(w io.Writer, i18nrs I18NRecords, prefix, indent string) error
SaveJSONIndent save I18NRecords as json with indent
Types ¶
type Analyzer ¶
type Analyzer struct { FuncName string // Function name Debug bool Records []I18NRecord }
Analyzer struct
func (*Analyzer) AnalyzeFromFile ¶
func (da *Analyzer) AnalyzeFromFile(filename string) []I18NRecord
AnalyzeFromFile analyzes a go file
func (*Analyzer) AnalyzeFromFiles ¶
func (da *Analyzer) AnalyzeFromFiles(files []string) []I18NRecord
AnalyzeFromFiles analyzes multiple go source files
type I18NRecord ¶
I18NRecord has `id` and `translation` field
Click to show internal directories.
Click to hide internal directories.