/
types.go
53 lines (49 loc) · 1.58 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package common
// traverseWorker performs work
// The parameters can be used to identify work targets, options or behaviors
// An error can be returned
type traverseWorker func(string) error
type Config struct {
InputDir string
OutputDir string
OverwriteOutput bool
ExcludeFile string
LogLevel string
ResourceFilePrefix string
ResourceFileDelimiter string
ResourceFileSuffix string
ResourceIndexStart uint64
ResourceIndexZeroPad uint8
ResourceTokenPrefix string
ResourceFunctionTemplate string
LanguageConfig LanguageConfig
}
type LanguageConfig struct {
PackageIdentifier string
StringDelimiter string
SingleLineCommentDelimiter string
BlockCommentBeginDelimiter string
BlockCommentEndDelimiter string
ImportKeyword string
ImportBlockBegin string
ImportBlockEnd string
ConstKeyword string
ConstBlockBegin string
ConstBlockEnd string
}
// GoLanguageConfig returns a LanguageConfig specific to Go(lang)
func GoLanguageConfig() LanguageConfig {
return LanguageConfig{
PackageIdentifier: "package",
StringDelimiter: "\"",
SingleLineCommentDelimiter: "//",
BlockCommentBeginDelimiter: "/*",
BlockCommentEndDelimiter: "*/",
ImportKeyword: "import",
ImportBlockBegin: "import (",
ImportBlockEnd: ")",
ConstKeyword: "const",
ConstBlockBegin: "const (",
ConstBlockEnd: ")",
}
}