Skip to content

Commit

Permalink
add Header.Clone()
Browse files Browse the repository at this point in the history
  • Loading branch information
imroc committed Oct 15, 2017
1 parent c7e2ddf commit 9e6a984
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions req.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ const (
// Header represents http request header
type Header map[string]string

func (h Header) Clone() Header {
if h == nil {
return nil
}
hh := Header{}
for k, v := range h {
hh[k] = v
}
return hh
}

// Param represents http request param
type Param map[string]string

Expand Down

0 comments on commit 9e6a984

Please sign in to comment.