When using GO's Gin framework, package the front-end built dist project into the same bin scenario, and when the static resources of the front-end file are routed for requests, if it is a routing address starting with /, gin will report an error panic: catch-all conflicts with existing handle for the path segment root in path '/* filepath'
How to implement the situation without modifying the backend API, and use the StaticFS method to map requests for static resources with / prefixed routes into embedFS
enter image description here
This can be achieved by putting all routed requests into NoRoute, but this is less elegant. Personally, I think that all resources in embedFS should be matched through StaticFS, and then the unmatched resources should be reasonably compared with NoRoute. At the same time, the project does not want to add a routing prefix such as /static to the front-end request, nor does it want to modify the /api prefix of the back-end request