MAINT: golint
This commit is contained in:
parent
52773af3b3
commit
bd93fd22bb
1 changed files with 3 additions and 3 deletions
6
main.go
6
main.go
|
@ -38,7 +38,7 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
io.Copy(f, file)
|
io.Copy(f, file)
|
||||||
|
|
||||||
err = Unzip(filename, filepath.Join("tmp", "serve"))
|
err = unzip(filename, filepath.Join("tmp", "serve"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modified from http://stackoverflow.com/a/24792688
|
// Modified from http://stackoverflow.com/a/24792688
|
||||||
func Unzip(src, dest string) error {
|
func unzip(src, dest string) error {
|
||||||
r, err := zip.OpenReader(src)
|
r, err := zip.OpenReader(src)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -132,7 +132,7 @@ func Unzip(src, dest string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var index string = `
|
var index = `
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
Loading…
Add table
Reference in a new issue