Skip to content

Commit

Permalink
fix 1.18support any 2022-10-20
Browse files Browse the repository at this point in the history
  • Loading branch information
hktalent committed Oct 20, 2022
1 parent 8c25e13 commit 98dbf85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/doc_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type DocIndexHandler struct {
defaultIndexName string
IndexNameLookup varLookupFunc
DocIDLookup varLookupFunc
IndexDocType map[string]any
IndexDocType map[string]interface{}
}

func NewDocIndexHandler(defaultIndexName string) *DocIndexHandler {
Expand Down Expand Up @@ -68,7 +68,7 @@ func (h *DocIndexHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
}

// parse request body as json
var doc any
var doc interface{}
if nil != h.IndexDocType {
if v, ok := h.IndexDocType[indexName]; ok {
doc = v
Expand Down

0 comments on commit 98dbf85

Please sign in to comment.