I coded the file server in golang as follows
func (s *Server) Start() {
s.Mux.PathPrefix("/public/").Handler(http.StripPrefix("/public/", http.FileServer(http.Dir("public")))) // 파일 등록
After that, i'm connect with a browser to ' localhost/public/temp.json ' The file returns fine, but I think something is wrong, Because the url is localhost/public/temp.json
because stripPrefix is remove 'public', must be url is ' localhost/temp.json '
What's wrong? I am learning golang, can you help me?