Skip to content

Commit

Permalink
Merge pull request #9 from vvatanabe/issue/8/extend-githttptransfer-c…
Browse files Browse the repository at this point in the history
…ontext

#8 add a setter to the ght context
  • Loading branch information
vvatanabe authored Oct 1, 2017
2 parents 628ca17 + c8aa125 commit 153342e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions githttptransfer/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ type (
Context interface {
Response() *Response
Request() *http.Request
SetRequest(r *http.Request)
RepoPath() string
SetRepoPath(repoPath string)
FilePath() string
SetFilePath(filePath string)
}

context struct {
Expand Down Expand Up @@ -37,10 +40,22 @@ func (c *context) Request() *http.Request {
return c.request
}

func (c *context) SetRequest(r *http.Request) {
c.request = r
}

func (c *context) RepoPath() string {
return c.repoPath
}

func (c *context) SetRepoPath(repoPath string) {
c.repoPath = repoPath
}

func (c *context) FilePath() string {
return c.filePath
}

func (c *context) SetFilePath(filePath string) {
c.filePath = filePath
}

0 comments on commit 153342e

Please sign in to comment.