Skip to content

Commit

Permalink
Add missing Find method (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach authored Dec 27, 2024
1 parent 03da900 commit e06fce7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/go-chi/hostrouter

go 1.16

require github.com/go-chi/chi/v5 v5.0.0
require github.com/go-chi/chi/v5 v5.2.0
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/go-chi/chi/v5 v5.0.0 h1:DBPx88FjZJH3FsICfDAfIfnb7XxKIYVGG6lOPlhENAg=
github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs=
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=
github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
4 changes: 4 additions & 0 deletions hostrouter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ func (hr Routes) Match(rctx *chi.Context, method, path string) bool {
return true
}

func (hr Routes) Find(rctx *chi.Context, method, path string) string {
return ""
}

func (hr Routes) Map(host string, h chi.Router) {
hr[strings.ToLower(host)] = h
}
Expand Down

0 comments on commit e06fce7

Please sign in to comment.