-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathdecl.go
66 lines (52 loc) · 1.39 KB
/
decl.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
54
55
56
57
58
59
60
61
62
63
64
65
66
package main
import (
"strings"
)
var DEBUG = false
var attributePrefix = "Attr"
var codeGenConvert = false
var classicStructNamesWithUnderscores = false
var nameSpaceInJsonName = false
var prettyPrint = false
var progress = false
var readFromStandardIn = false
var sortByXmlOrder = false
var structsToStdout = true
var validateFieldTemplate = false
var ignoreLowerCaseXmlTags = false
var ignoredXmlTags = ""
var ignoredXmlTagsMap *map[string]struct{}
var ignoreXmlDecodingErrors = false
var codeGenDir = "codegen"
var codeGenFilename = "CodeGenStructs.go"
// Java out
const javaBasePackage = "ca.gnewton.chidley"
const mavenJavaBase = "src/main/java"
var javaBasePackagePath = strings.Replace(javaBasePackage, ".", "/", -1)
var javaAppName = "jaxb"
var writeJava = false
var baseJavaDir = "java"
var userJavaPackageName = ""
var namePrefix = "C"
var nameSuffix = ""
var xmlName = false
var url = false
var useType = false
var addDbMetadata = false
var flattenStrings = false
//FIXXX: should not be global
var keepXmlFirstLetterCase = true
var lengthTagName = ""
var lengthTagPadding int64 = 0
var lengthTagAttribute = ""
var lengthTagSeparator = ":"
var cdataStringName = "Text"
var cdataNumberName = "Number"
var cdataBooleanName = "Flag"
type structSortFunc func(v *PrintGoStructVisitor)
var structSort = printStructsAlphabetical
var outputs = []*bool{
&codeGenConvert,
&structsToStdout,
&writeJava,
}