Browse Source

Remove return-only else branches.

Coda Hale 12 years ago
parent
commit
a412c1af77
2 changed files with 2 additions and 4 deletions
  1. +1
    -2
      web/middleware/options.go
  2. +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 {


Loading…
Cancel
Save