refactoring, same logic, but the store replication logic is moved to a

stand-alone file, for later easier improvements
This commit is contained in:
Chris Lu
2013-04-16 00:10:21 -07:00
parent e4da140d0a
commit 915b16f97a
6 changed files with 108 additions and 89 deletions

View File

@@ -36,7 +36,7 @@ type Needle struct {
Padding []byte `comment:"Aligned to 8 bytes"`
}
func NewNeedle(r *http.Request) (n *Needle, fname string, e error) {
func NewNeedle(r *http.Request) (n *Needle, e error) {
n = new(Needle)
form, fe := r.MultipartReader()
@@ -51,7 +51,7 @@ func NewNeedle(r *http.Request) (n *Needle, fname string, e error) {
e = fe
return
}
fname = part.FileName()
fname := part.FileName()
if fname != "" {
fname = path.Base(part.FileName())
} else {