mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-25 19:02:22 +01:00
README update for sonarcloud badges, simplify some test code, fixed some sonarlint issues
This commit is contained in:
@@ -29,10 +29,10 @@ func List(cfg *config.Config, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func listRoutes(cfg *config.Config, w http.ResponseWriter, r *http.Request) {
|
||||
routes := cfg.RoutesByAlias()
|
||||
type_filter := r.FormValue("type")
|
||||
if type_filter != "" {
|
||||
typeFilter := r.FormValue("type")
|
||||
if typeFilter != "" {
|
||||
for k, v := range routes {
|
||||
if v["type"] != type_filter {
|
||||
if v["type"] != typeFilter {
|
||||
delete(routes, k)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user