Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom Delims support #860

Merged
merged 9 commits into from
May 29, 2017
Merged

add custom Delims support #860

merged 9 commits into from
May 29, 2017

Conversation

shenshouer
Copy link
Contributor

add custom delims support, for example:

...
r := gin.Default()
r.Delims("{[{", "}]}")
r.LoadHTMLGlob("/path/to/templates"))
...
...

@codecov-io
Copy link

codecov-io commented Apr 1, 2017

Codecov Report

Merging #860 into develop will increase coverage by 0.46%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #860      +/-   ##
===========================================
+ Coverage    93.49%   93.95%   +0.46%     
===========================================
  Files           16       16              
  Lines         1353     1357       +4     
===========================================
+ Hits          1265     1275      +10     
+ Misses          78       68      -10     
- Partials        10       14       +4
Impacted Files Coverage Δ
gin.go 90% <100%> (+3.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5d9c2f...b4e7ec8. Read the comment docs.

@appleboy
Copy link
Member

appleboy commented Apr 1, 2017

Wrong branch and missing testing.

@shenshouer
Copy link
Contributor Author

@appleboy How can I do for this PR?

@appleboy appleboy changed the base branch from master to develop April 2, 2017 15:28
@appleboy
Copy link
Member

appleboy commented Apr 2, 2017

@saser I changed the base branch. You just add testing code on your branch and push commits.

@shenshouer
Copy link
Contributor Author

@appleboy Need I add testing code on the master branch , then push commits ? Or others?

@appleboy
Copy link
Member

appleboy commented Apr 7, 2017

@shenshouer Push your commits in your master branch.

@appleboy appleboy self-requested a review April 8, 2017 00:40
gin.go Outdated
func (engine *Engine) LoadHTMLGlob(pattern string) {
if IsDebugging() {
debugPrintLoadTemplate(template.Must(template.ParseGlob(pattern)))
engine.HTMLRender = render.HTMLDebug{Glob: pattern}
// debugPrintLoadTemplate(template.Must(template.ParseGlob(pattern)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this comments code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shenshouer Please remove this comments.

gin_test.go Outdated
@@ -8,11 +8,60 @@ import (
"reflect"
"testing"

"net/http"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all these blank lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the miss inspection, this was auto import package and format style by the vscode.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the empty line for import native package.

@appleboy
Copy link
Member

@tboerger Please review again.

@tboerger
Copy link
Contributor

Looks like the commits ate messed up, you need to rebase properly.

@appleboy
Copy link
Member

appleboy commented Apr 11, 2017

@tboerger no. It doesn't matter about previous commits. We can squash and merge this PR.

@abrander
Copy link

How can we get this merged?

@appleboy appleboy merged commit 35f5df6 into gin-gonic:develop May 29, 2017
@appleboy
Copy link
Member

@shenshouer Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants