Skip to content

Commit

Permalink
Merge branch 'v3' into deep_source_pr_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael authored Sep 29, 2023
2 parents 1f3a7dd + 22be94d commit fc96343
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion http/codegen/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ func {{ .MountHandler }}(mux goahttp.Muxer, h http.Handler) {
{{- if .IsDir }}
{{- range .RequestPaths }}
mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}", h.ServeHTTP)
mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}*{{ $.PathParam }}", h.ServeHTTP)
mux.Handle("GET", "{{ . }}{{if ne . "/"}}/{{end}}{*{{ $.PathParam }}}", h.ServeHTTP)
{{- end }}
{{- else }}
{{- range .RequestPaths }}
Expand Down
4 changes: 2 additions & 2 deletions http/codegen/testdata/server_init_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,15 @@ func (s *Server) Mount(mux goahttp.Muxer) {
var ServerMultipleFilesMounterCode = `// MountPathToFolder configures the mux to serve GET request made to "/".
func MountPathToFolder(mux goahttp.Muxer, h http.Handler) {
mux.Handle("GET", "/", h.ServeHTTP)
mux.Handle("GET", "/*wildcard", h.ServeHTTP)
mux.Handle("GET", "/{*wildcard}", h.ServeHTTP)
}
`

var ServerMultipleFilesWithPrefixPathMounterCode = `// MountPathToFolder configures the mux to serve GET request made to
// "/server_file_server".
func MountPathToFolder(mux goahttp.Muxer, h http.Handler) {
mux.Handle("GET", "/server_file_server/", h.ServeHTTP)
mux.Handle("GET", "/server_file_server/*wildcard", h.ServeHTTP)
mux.Handle("GET", "/server_file_server/{*wildcard}", h.ServeHTTP)
}
`

Expand Down

0 comments on commit fc96343

Please sign in to comment.