Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
a0237cda
Commit
a0237cda
authored
Feb 11, 2018
by
Sietse Ringers
Browse files
Simplify assigning
parent
9d652828
Changes
1
Hide whitespace changes
Inline
Side-by-side
transport.go
View file @
a0237cda
...
...
@@ -32,14 +32,6 @@ func NewHTTPTransport(serverURL string) *HTTPTransport {
url
+=
"/"
}
transport
:=
&
HTTPTransport
{
Server
:
url
,
headers
:
map
[
string
]
string
{},
client
:
&
http
.
Client
{
Timeout
:
time
.
Second
*
15
,
},
}
// Create a transport that dials with a SIGPIPE handler (which is only active on iOS)
var
innerTransport
http
.
Transport
...
...
@@ -54,9 +46,14 @@ func NewHTTPTransport(serverURL string) *HTTPTransport {
return
c
,
nil
}
transport
.
client
.
Transport
=
&
innerTransport
return
transport
return
&
HTTPTransport
{
Server
:
url
,
headers
:
map
[
string
]
string
{},
client
:
&
http
.
Client
{
Timeout
:
time
.
Second
*
15
,
Transport
:
&
innerTransport
,
},
}
}
// SetHeader sets a header to be sent in requests.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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