ServiceCode제거
This commit is contained in:
@ -411,9 +411,7 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
|
||||
atomic.StorePointer(&mg.serviceptr, unsafe.Pointer(only))
|
||||
} else {
|
||||
empty := serviceDescription{
|
||||
ServiceDescriptionSummary: ServiceDescriptionSummary{
|
||||
Id: primitive.NewObjectID(),
|
||||
},
|
||||
Id: primitive.NewObjectID(),
|
||||
}
|
||||
|
||||
if *devflag {
|
||||
@ -455,14 +453,13 @@ func (mg *Maingate) RegisterHandlers(ctx context.Context, serveMux *http.ServeMu
|
||||
}
|
||||
}
|
||||
|
||||
logger.Println("Service is registered :", mg.service().ServiceCode)
|
||||
if *devflag {
|
||||
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, mg.service().ServiceCode, "/"), func(w http.ResponseWriter, r *http.Request) {
|
||||
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "/"), func(w http.ResponseWriter, r *http.Request) {
|
||||
// mg.service()를 요청마다 불러야 함
|
||||
mg.service().serveHTTP_dev(w, r)
|
||||
})
|
||||
} else {
|
||||
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, mg.service().ServiceCode, "/"), func(w http.ResponseWriter, r *http.Request) {
|
||||
serveMux.HandleFunc(gocommon.MakeHttpHandlerPattern(prefix, "/"), func(w http.ResponseWriter, r *http.Request) {
|
||||
// mg.service()를 요청마다 불러야 함
|
||||
mg.service().serveHTTP(w, r)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user