@@ -168,12 +168,14 @@ func renderInProgress(w http.ResponseWriter, r *http.Request, badge []byte, vali
168
168
// Parse results into html template and serve it
169
169
head := fmt .Sprintf ("%s validation for %s/%s" , validator , user , repo )
170
170
srvcfg := config .Read ()
171
+ year , _ , _ := time .Now ().Date ()
171
172
info := struct {
172
- Badge template.HTML
173
- Header string
174
- Content string
175
- GinURL string
176
- }{template .HTML (badge ), head , string (progressmsg ), srvcfg .GINAddresses .WebURL }
173
+ Badge template.HTML
174
+ Header string
175
+ Content string
176
+ GinURL string
177
+ CurrentYear int
178
+ }{template .HTML (badge ), head , string (progressmsg ), srvcfg .GINAddresses .WebURL , year }
177
179
178
180
err = tmpl .ExecuteTemplate (w , "layout" , info )
179
181
if err != nil {
@@ -210,13 +212,15 @@ func renderBIDSResults(w http.ResponseWriter, r *http.Request, badge []byte, con
210
212
211
213
// Parse results into html template and serve it
212
214
head := fmt .Sprintf ("BIDS validation for %s/%s" , user , repo )
215
+ year , _ , _ := time .Now ().Date ()
213
216
srvcfg := config .Read ()
214
217
info := struct {
215
218
Badge template.HTML
216
219
Header string
217
220
* BidsResultStruct
218
- GinURL string
219
- }{template .HTML (badge ), head , & resBIDS , srvcfg .GINAddresses .WebURL }
221
+ GinURL string
222
+ CurrentYear int
223
+ }{template .HTML (badge ), head , & resBIDS , srvcfg .GINAddresses .WebURL , year }
220
224
221
225
err = tmpl .ExecuteTemplate (w , "layout" , info )
222
226
if err != nil {
@@ -245,13 +249,15 @@ func renderNIXResults(w http.ResponseWriter, r *http.Request, badge []byte, cont
245
249
246
250
// Parse results into html template and serve it
247
251
head := fmt .Sprintf ("NIX validation for %s/%s" , user , repo )
252
+ year , _ , _ := time .Now ().Date ()
248
253
srvcfg := config .Read ()
249
254
info := struct {
250
- Badge template.HTML
251
- Header string
252
- Content string
253
- GinURL string
254
- }{template .HTML (badge ), head , string (content ), srvcfg .GINAddresses .WebURL }
255
+ Badge template.HTML
256
+ Header string
257
+ Content string
258
+ GinURL string
259
+ CurrentYear int
260
+ }{template .HTML (badge ), head , string (content ), srvcfg .GINAddresses .WebURL , year }
255
261
256
262
err = tmpl .ExecuteTemplate (w , "layout" , info )
257
263
if err != nil {
@@ -281,12 +287,14 @@ func renderODMLResults(w http.ResponseWriter, r *http.Request, badge []byte, con
281
287
// Parse results into html template and serve it
282
288
head := fmt .Sprintf ("odML validation for %s/%s" , user , repo )
283
289
srvcfg := config .Read ()
290
+ year , _ , _ := time .Now ().Date ()
284
291
info := struct {
285
- Badge template.HTML
286
- Header string
287
- Content string
288
- GinURL string
289
- }{template .HTML (badge ), head , string (content ), srvcfg .GINAddresses .WebURL }
292
+ Badge template.HTML
293
+ Header string
294
+ Content string
295
+ GinURL string
296
+ CurrentYear int
297
+ }{template .HTML (badge ), head , string (content ), srvcfg .GINAddresses .WebURL , year }
290
298
291
299
err = tmpl .ExecuteTemplate (w , "layout" , info )
292
300
if err != nil {
0 commit comments