nil exception 수정

This commit is contained in:
2023-09-05 12:06:36 +09:00
parent 5117847740
commit def9494dd3

View File

@ -704,6 +704,10 @@ type HttpApiHandlerContainer struct {
}
func (hc *HttpApiHandlerContainer) RegistReceiver(receiver HttpApiReceiver) {
if hc.methods == nil {
hc.methods = make(map[string]apiFuncType)
}
for k, v := range receiver.methods {
logger.Println("http api registered :", k)
hc.methods[k] = v