Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-workhorse
Commits
39b50833
Commit
39b50833
authored
Dec 19, 2015
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go fmt
parent
04d16195
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
internal/helper/test.go
internal/helper/test.go
+4
-4
internal/lfs/lfs.go
internal/lfs/lfs.go
+1
-1
internal/upstream/upstream.go
internal/upstream/upstream.go
+9
-9
No files found.
internal/helper/test.go
View file @
39b50833
package
helper
package
helper
import
(
import
(
"log"
"net/http"
"net/http/httptest"
"net/http/httptest"
"net/htt
p"
"regex
p"
"testing"
"testing"
"regexp"
"log"
)
)
func
AssertResponseCode
(
t
*
testing
.
T
,
response
*
httptest
.
ResponseRecorder
,
expectedCode
int
)
{
func
AssertResponseCode
(
t
*
testing
.
T
,
response
*
httptest
.
ResponseRecorder
,
expectedCode
int
)
{
...
@@ -42,4 +42,4 @@ func TestServerWithHandler(url *regexp.Regexp, handler http.HandlerFunc) *httpte
...
@@ -42,4 +42,4 @@ func TestServerWithHandler(url *regexp.Regexp, handler http.HandlerFunc) *httpte
handler
(
w
,
r
)
handler
(
w
,
r
)
}))
}))
}
}
\ No newline at end of file
internal/lfs/lfs.go
View file @
39b50833
...
@@ -7,7 +7,7 @@ package lfs
...
@@ -7,7 +7,7 @@ package lfs
import
(
import
(
"../api"
"../api"
"../helper"
"../helper"
"../proxy"
"../proxy"
"bytes"
"bytes"
"crypto/sha256"
"crypto/sha256"
"encoding/hex"
"encoding/hex"
...
...
internal/upstream/upstream.go
View file @
39b50833
...
@@ -14,20 +14,20 @@ import (
...
@@ -14,20 +14,20 @@ import (
"net"
"net"
"net/http"
"net/http"
"net/url"
"net/url"
"path"
"strings"
"strings"
"path"
"time"
"time"
)
)
type
Upstream
struct
{
type
Upstream
struct
{
Version
string
Version
string
API
*
api
.
API
API
*
api
.
API
Proxy
*
proxy
.
Proxy
Proxy
*
proxy
.
Proxy
DocumentRoot
string
DocumentRoot
string
DevelopmentMode
bool
DevelopmentMode
bool
ResponseHeadersTimeout
time
.
Duration
ResponseHeadersTimeout
time
.
Duration
urlPrefix
urlPrefix
urlPrefix
urlPrefix
routes
[]
route
routes
[]
route
}
}
func
New
(
authBackend
string
,
authSocket
string
,
version
string
,
responseHeadersTimeout
time
.
Duration
)
*
Upstream
{
func
New
(
authBackend
string
,
authSocket
string
,
version
string
,
responseHeadersTimeout
time
.
Duration
)
*
Upstream
{
...
@@ -143,4 +143,4 @@ func cleanURIPath(p string) string {
...
@@ -143,4 +143,4 @@ func cleanURIPath(p string) string {
np
+=
"/"
np
+=
"/"
}
}
return
np
return
np
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment