Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
go-sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
id
go-sso
Commits
a714fb79
Commit
a714fb79
authored
Dec 15, 2019
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the merged context when calling ExecuteTemplate
Fix a bug where global variables were missing.
parent
e6ce37fb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
httputil/renderer.go
httputil/renderer.go
+1
-1
No files found.
httputil/renderer.go
View file @
a714fb79
...
...
@@ -45,7 +45,7 @@ func (r *Renderer) Render(w http.ResponseWriter, req *http.Request, templateName
// Render the template into a buffer, to prevent returning
// half-rendered templates when there is an error.
var
buf
bytes
.
Buffer
if
err
:=
r
.
tpl
.
ExecuteTemplate
(
&
buf
,
templateName
,
data
);
err
!=
nil
{
if
err
:=
r
.
tpl
.
ExecuteTemplate
(
&
buf
,
templateName
,
vars
);
err
!=
nil
{
log
.
Printf
(
"template rendering error for %s: %v"
,
req
.
URL
.
String
(),
err
)
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusInternalServerError
)
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment