Commit 2d1bf3dd authored by Jérome Perrin's avatar Jérome Perrin Committed by Alain Takoudjou

format code with make fmt

parent 86e880fc
......@@ -3,11 +3,6 @@ package api
//"gitlab.com/gitlab-org/gitlab-workhorse/internal/badgateway"
import (
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
proxypkg "gitlab.com/gitlab-org/gitlab-workhorse/internal/proxy"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/sendfile"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"fmt"
"net/http"
"net/http/httptest"
......@@ -15,6 +10,13 @@ import (
"strings"
"sync"
"time"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
proxypkg "gitlab.com/gitlab-org/gitlab-workhorse/internal/proxy"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/sendfile"
)
// Reply from auth backend, e.g. for "download from repo" authorization request
......
......@@ -6,8 +6,6 @@
package git
import (
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"bufio"
"errors"
"fmt"
......@@ -15,11 +13,14 @@ import (
"log"
"net/http"
"net/url"
"os"
"os/exec"
"regexp"
"strings"
"os/exec"
"syscall"
"os"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
// HTTP handler for `.../raw/<ref>/path`
......@@ -75,7 +76,6 @@ func handleGetBlobRaw(a *api.API, w http.ResponseWriter, r *http.Request, repoPa
emitBlob(w, p, refpath, r)
}
// Put back gitCommand function which was removed in
var execCommand = exec.Command
......@@ -101,7 +101,6 @@ func gitCommand(glId string, glRepository string, name string, args ...string) *
return cmd
}
// Emit content of blob located at <ref>/path (jointly denoted as 'refpath') to output
func emitBlob(w http.ResponseWriter, repopath string, refpath string, r *http.Request) {
// Communicate with `git cat-file --batch` trying refs from longest
......
......@@ -189,7 +189,7 @@ func (u *upstream) configureRoutes() {
route("PUT", gitProjectPattern+`gitlab-lfs/objects/([0-9a-f]{64})/([0-9]+)\z`, lfs.PutStore(api, signingProxy), withMatcher(isContentType("application/octet-stream"))),
// Raw blobs
route("GET", projectPattern + `raw/`, git.GetBlobRaw(api, u.RepoPath)),
route("GET", projectPattern+`raw/`, git.GetBlobRaw(api, u.RepoPath)),
// CI Artifacts
route("POST", apiPattern+`v4/jobs/[0-9]+/artifacts\z`, contentEncodingHandler(artifacts.UploadArtifacts(api, signingProxy))),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment