mirror of
https://github.com/pldubouilh/gossa.git
synced 2026-09-03 23:57:45 -04:00
cleanup var names
This commit is contained in:
@@ -6,7 +6,7 @@ build:
|
|||||||
build-all:
|
build-all:
|
||||||
make embed
|
make embed
|
||||||
env GOOS=linux GOARCH=amd64 go build gossa.go
|
env GOOS=linux GOARCH=amd64 go build gossa.go
|
||||||
mv gossa gossa-linux
|
mv gossa gossa-linux64
|
||||||
env GOOS=linux GOARCH=arm go build gossa.go
|
env GOOS=linux GOARCH=arm go build gossa.go
|
||||||
mv gossa gossa-linux-arm
|
mv gossa gossa-linux-arm
|
||||||
env GOOS=linux GOARCH=arm64 go build gossa.go
|
env GOOS=linux GOARCH=arm64 go build gossa.go
|
||||||
@@ -20,7 +20,7 @@ build-all:
|
|||||||
clean:
|
clean:
|
||||||
-rm gossa.go
|
-rm gossa.go
|
||||||
-rm gossa
|
-rm gossa
|
||||||
-rm gossa-linux
|
-rm gossa-linux64
|
||||||
-rm gossa-linux-arm
|
-rm gossa-linux-arm
|
||||||
-rm gossa-linux-arm64
|
-rm gossa-linux-arm64
|
||||||
-rm gossa-mac
|
-rm gossa-mac
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ func doContent(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func upload(w http.ResponseWriter, r *http.Request) {
|
func upload(w http.ResponseWriter, r *http.Request) {
|
||||||
unescaped, _ := url.PathUnescape(r.Header.Get("bossa-path"))
|
unescaped, _ := url.PathUnescape(r.Header.Get("gossa-path"))
|
||||||
fullPath, err := checkPath(unescaped)
|
fullPath, err := checkPath(unescaped)
|
||||||
|
|
||||||
logVerb("Up", err, fullPath)
|
logVerb("Up", err, fullPath)
|
||||||
@@ -232,7 +232,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var hostString = *host + ":" + *port
|
var hostString = *host + ":" + *port
|
||||||
fmt.Println("Bossa startig on directory " + initPath)
|
fmt.Println("Gossa startig on directory " + initPath)
|
||||||
fmt.Println("Listening on http://" + hostString)
|
fmt.Println("Listening on http://" + hostString)
|
||||||
|
|
||||||
var root = http.Dir(initPath)
|
var root = http.Dir(initPath)
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@ func postDummyFile(t *testing.T, url string, path string) string {
|
|||||||
req, err := http.NewRequest("POST", url, body)
|
req, err := http.NewRequest("POST", url, body)
|
||||||
dieMaybe(t, err)
|
dieMaybe(t, err)
|
||||||
req.Header.Set("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundarycCRIderiXxJWEUcU")
|
req.Header.Set("Content-Type", "multipart/form-data; boundary=----WebKitFormBoundarycCRIderiXxJWEUcU")
|
||||||
req.Header.Set("Bossa-Path", path)
|
req.Header.Set("Gossa-Path", path)
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := http.DefaultClient.Do(req)
|
||||||
dieMaybe(t, err)
|
dieMaybe(t, err)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ gossa
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://travis-ci.org/pldubouilh/bossa)
|
[](https://travis-ci.org/pldubouilh/gossa)
|
||||||
|
|
||||||
🎶 A fast and simple webserver for your files. It's dependency-free and with under 250 lines for the server code, easily code-reviewable.
|
🎶 A fast and simple webserver for your files. It's dependency-free and with under 250 lines for the server code, easily code-reviewable.
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ function postFile (file, path) {
|
|||||||
path = decodeURI(location.pathname).slice(0, -1) + path
|
path = decodeURI(location.pathname).slice(0, -1) + path
|
||||||
|
|
||||||
xhr.open('POST', window.location.origin + '/post')
|
xhr.open('POST', window.location.origin + '/post')
|
||||||
xhr.setRequestHeader("bossa-path", encodeURIComponent(path))
|
xhr.setRequestHeader("gossa-path", encodeURIComponent(path))
|
||||||
xhr.upload.id = newBar(path)
|
xhr.upload.id = newBar(path)
|
||||||
|
|
||||||
const formData = new window.FormData()
|
const formData = new window.FormData()
|
||||||
|
|||||||
Reference in New Issue
Block a user