grim/youtrack-import
Clone
Summary
Browse
Changes
Graph
use `unset` as the value when a state is moving to/from an unknown states. Fixes YI-27
2020-01-17, Gary Kramlich
741af4ca4d62
use `unset` as the value when a state is moving to/from an unknown states. Fixes YI-27
package
youtrack
import
(
"fmt"
"net/http"
)
type
Transport
struct
{
Transport
http
.
RoundTripper
token
string
}
func
NewTransport
(
token
string
)
*
Transport
{
return
&
Transport
{
Transport
:
http
.
DefaultTransport
,
token
:
token
,
}
}
func
(
t
*
Transport
)
RoundTrip
(
req
*
http
.
Request
)
(
*
http
.
Response
,
error
)
{
req
.
Header
.
Set
(
"Authorization"
,
fmt
.
Sprintf
(
"Bearer %s"
,
t
.
token
))
return
t
.
Transport
.
RoundTrip
(
req
)
}