Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
feat(param.go): Getter, Setter added
Browse files Browse the repository at this point in the history
  • Loading branch information
2rebi committed Jul 3, 2022
1 parent 5516c85 commit 917dac2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions param.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,17 @@ type PathParam struct {

type PathParams map[string]PathParam

func (p PathParams) Get(key string) string {
param, ok := p[key]
if !ok {
return ""
}

return param.Value
}

func (p PathParams) Set(key string, param PathParam) {
p[key] = param
}

// TODO 바인딩 추가 필요

0 comments on commit 917dac2

Please sign in to comment.