OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package templates | 5 package templates |
6 | 6 |
7 import ( | 7 import ( |
8 "bytes" | 8 "bytes" |
9 "io/ioutil" | 9 "io/ioutil" |
10 "text/template" | 10 "text/template" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 {{ template "Union" $union }} | 85 {{ template "Union" $union }} |
86 {{- end}} | 86 {{- end}} |
87 | 87 |
88 {{- range $enum := $fileTmpl.Enums}} | 88 {{- range $enum := $fileTmpl.Enums}} |
89 {{ template "EnumDecl" $enum }} | 89 {{ template "EnumDecl" $enum }} |
90 {{- end}} | 90 {{- end}} |
91 | 91 |
92 {{- range $interface := $fileTmpl.Interfaces}} | 92 {{- range $interface := $fileTmpl.Interfaces}} |
93 {{ template "Interface" $interface }} | 93 {{ template "Interface" $interface }} |
94 {{- end}} | 94 {{- end}} |
| 95 |
| 96 {{- range $constant := $fileTmpl.Constants}} |
| 97 const {{$constant.Name}} {{$constant.Type}} = {{$constant.Value}} |
| 98 {{end}} |
95 {{- end -}} | 99 {{- end -}} |
96 ` | 100 ` |
OLD | NEW |