Documentation ¶
Index ¶
- func ExportToTranslationsMap(projectPath string) (translationsMap map[string]map[string]string, err error)
- func ImportFromTranslationsMap(projectPath string, translationsMap map[string]map[string]string) (err error)
- func ParseDir(fset *token.FileSet, path string, filter func(fs.FileInfo) bool, ...) (pkgs map[string]*ast.Package, first error)
- type MessageStruct
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportToTranslationsMap ¶
func ExportToTranslationsMap(projectPath string) (translationsMap map[string]map[string]string, err error)
get translationsMap from projectPath
Types ¶
type MessageStruct ¶
type Visitor ¶
type Visitor struct { // map[locale][]MessageStruct // example: // { // "English": [ // { // "PkgName": "x/i18n", // "StructName": "Messages_en_US" // } // ], // } RigisterMap map[string][]MessageStruct // map[locale][]MessageStruct // example: // { // "Messages_en_US": "English", // "Messages_zh_CN": "SimplifiedChinese" // } LocalesMap map[string]string // map[pkgName][]structs // example: // { // "x/i18n": []*ast.GenDecl, // } Variables map[string][]*ast.GenDecl // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.