Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.22 ServeMux documentation #113

Open
halon176 opened this issue Apr 10, 2024 · 0 comments
Open

Go 1.22 ServeMux documentation #113

halon176 opened this issue Apr 10, 2024 · 0 comments

Comments

@halon176
Copy link

I'm not entirely certain, but I'm wondering if it's possible to use Swaggo along with this package to document a Mux server without the use of Chi (as seen in most examples). Specifically, I'm interested in documenting a server structured like this:

package main

import (
	"net/http"
)



func main() {
	mux := http.NewServeMux()
	mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		w.Write([]byte("Hello, World!"))
	})

	http.ListenAndServe(":8080", mux)
}

In theory, since this follows a net/http structure, it seems feasible that this package could be utilized to document this type of API.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant