This website works better with JavaScript.
Home
Explore
Help
Sign In
brettlangdon
/
pypihub
mirror of
https://github.com/brettlangdon/pypihub.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Projects
0
Releases
1
Wiki
Activity
Browse Source
Remove return-only else branches.
Coda Hale
12 years ago
parent
0b12f5954e
commit
a412c1af77
2 changed files
with
2 additions
and
4 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-2
web/middleware/options.go
+1
-2
web/middleware/writer_proxy.go
+ 1
- 2
web/middleware/options.go
View File
@ -58,9 +58,8 @@ func getValidMethods(c web.C) []string {
}
if
methods
,
ok
:=
v
.
(
[
]
string
)
;
ok
{
return
methods
}
else
{
return
nil
}
return
nil
}
// Assumption: the list of methods is teensy, and that anything we could
+ 1
- 2
web/middleware/writer_proxy.go
View File
@ -16,9 +16,8 @@ func wrapWriter(w http.ResponseWriter) writerProxy {
bw
:=
basicWriter
{
ResponseWriter
:
w
}
if
cn
&&
fl
&&
hj
&&
rf
{
return
&
fancyWriter
{
bw
}
}
else
{
return
&
bw
}
return
&
bw
}
type
writerProxy
interface
{
Write
Preview
Loading…
Cancel
Save