diff --git a/app.go b/app.go index a4411bf..31b4ae3 100644 --- a/app.go +++ b/app.go @@ -54,7 +54,7 @@ func (s serviceHandlerDocumentationList) Less(i, j int) bool { func (s serviceHandlerDocumentationList) Swap(i, j int) { s[i], s[j] = s[j], s[i] } type serviceHandler interface { - GetDocumentation() serviceHandlerDocumentation + GetDocumentation() serviceHandlerDocumentationList Handle(ctx context.Context, params []string) (title, text, color string, err error) } @@ -180,9 +180,11 @@ func handleDemoPage(res http.ResponseWriter, r *http.Request) { examples := serviceHandlerDocumentationList{} for register, handler := range serviceHandlers { - tmp := handler.GetDocumentation() - tmp.Register = register - examples = append(examples, tmp) + tmps := handler.GetDocumentation() + for _, tmp := range tmps { + tmp.Register = register + examples = append(examples, tmp) + } } sort.Sort(examples) diff --git a/service_static.go b/service_static.go index 653d6fd..0ba1e90 100644 --- a/service_static.go +++ b/service_static.go @@ -12,12 +12,12 @@ func init() { type staticServiceHandler struct{} -func (s staticServiceHandler) GetDocumentation() serviceHandlerDocumentation { - return serviceHandlerDocumentation{ +func (s staticServiceHandler) GetDocumentation() serviceHandlerDocumentationList { + return serviceHandlerDocumentationList{{ ServiceName: "Static Badge", DemoPath: "/static/API/Documentation/4c1", Arguments: []string{"