Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix bug#1682

Merged
thinkerou merged 1 commit into
gin-gonic:masterfrom
thinkerou:fix-bugg
Dec 5, 2018
Merged

fix bug#1682
thinkerou merged 1 commit into
gin-gonic:masterfrom
thinkerou:fix-bugg

Conversation

@thinkerou

Copy link
Copy Markdown
Member

fix:

=== RUN   TestRouteStaticNoListing
--- FAIL: TestRouteStaticNoListing (0.00s)
	assertions.go:256: 
			Error Trace:	routes_test.go:298
			Error:      	Not equal: 
			            	expected: 404
			            	actual  : 200
			Test:       	TestRouteStaticNoListing

@thinkerou thinkerou added this to the 1.4 milestone Dec 5, 2018
@thinkerou thinkerou added the type/bug Found something you weren't expecting? Report it here! label Dec 5, 2018
@thinkerou thinkerou requested a review from appleboy December 5, 2018 01:32
@thinkerou

Copy link
Copy Markdown
Member Author

@MetalBreaker please review the pull request, thanks!

@codecov

codecov Bot commented Dec 5, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1682 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1682      +/-   ##
==========================================
+ Coverage   99.39%   99.39%   +<.01%     
==========================================
  Files          41       41              
  Lines        1993     1995       +2     
==========================================
+ Hits         1981     1983       +2     
  Misses          9        9              
  Partials        3        3
Impacted Files Coverage Δ
routergroup.go 100% <100%> (ø) ⬆️

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 f463d84...75090f5. Read the comment docs.

Comment thread routergroup.go
return func(c *Context) {
file := c.Param("filepath")
if _, nolisting := fs.(*onlyfilesFS); nolisting {
c.Writer.WriteHeader(http.StatusNotFound)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no return?

@thinkerou thinkerou Dec 5, 2018

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

no, if there have return it lead to TestRouterMiddlewareAndStatic error. because need to run fileServer.ServeHTTP.

@thinkerou thinkerou merged commit 98c7ac7 into gin-gonic:master Dec 5, 2018
@ilijaivanov

Copy link
Copy Markdown
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug Found something you weren't expecting? Report it here!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants