Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adjust function name and comments to better reflect what it does.

  • Loading branch information...
commit e693f0ce8d95e08d6fb99f29377749763c5f5940 1 parent 278b71a
@jcvernaleo jcvernaleo authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 controller.go
View
9 controller.go
@@ -188,10 +188,11 @@ func (c *Controller) RenderFile(file *os.File, delivery ContentDisposition) Resu
}
}
-// renderMemory is like RenderFile() expect that it renders a file that is kept
-// in memory rather than an ondisk os.File so content can be delivered
-// dynamically.
-func (c *Controller) RenderMemory(memfile io.Reader, filename string, delivery ContentDisposition) Result {
+// RenderBinary is like RenderFile() except that it instead of a file on disk,
+// it renders data from memory (which could be a file that has not been written,
+// the output from some function, or bytes streamed from somewhere else, as long
+// it implements io.Reader).
+func (c *Controller) RenderBinary(memfile io.Reader, filename string, delivery ContentDisposition) Result {
var (
modtime = time.Now()
)
Please sign in to comment.
Something went wrong with that request. Please try again.