Reformat code with go fmt
git-svn-id: file:///srv/svn/repo/marisa/trunk@31 d6811dac-2434-b64a-9ddc-f563ab233461
This commit is contained in:
17
partage.go
17
partage.go
@@ -1,21 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/user"
|
||||
"time"
|
||||
"path"
|
||||
"syscall"
|
||||
"strconv"
|
||||
"path/filepath"
|
||||
"html/template"
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"gopkg.in/ini.v1"
|
||||
@@ -196,12 +196,11 @@ func uploaderPost(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
writemeta(tmp.Name(), conf.expiry)
|
||||
|
||||
|
||||
link := conf.baseuri + conf.filectx + filepath.Base(tmp.Name())
|
||||
links = append(links, link)
|
||||
}
|
||||
|
||||
if (r.PostFormValue("output") == "html") {
|
||||
if r.PostFormValue("output") == "html" {
|
||||
data := templatedata{Links: links}
|
||||
servetemplate(w, "/upload.html", data)
|
||||
return
|
||||
@@ -291,7 +290,7 @@ func main() {
|
||||
log.Printf("Applied configuration:\n%s", conf)
|
||||
}
|
||||
|
||||
if (conf.chroot != "") {
|
||||
if conf.chroot != "" {
|
||||
if verbose {
|
||||
log.Printf("Changing root to %s", conf.chroot)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user