Skip to content

Commit

Permalink
Package router : add model config with constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
nabbar committed Dec 31, 2020
1 parent d97ed3e commit dec259c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions router/headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@ import (
"github.com/gin-gonic/gin"
)

type HeadersConfig map[string]string

func (h HeadersConfig) New() Headers {
var res = NewHeaders()

for k, v := range h {
res.Add(k, v)
}

return res
}

type headers struct {
head http.Header
}
Expand Down

0 comments on commit dec259c

Please sign in to comment.