The simplest way to get file system in go is the code below.
http.Handle("/files", http.StripPrefix(pathPrefix, http.FileServer(root)))
But for the purpose of objective design, I prefer to wrap the body of function in the method like this.
f := file{}
http.Handle("/download", f.download)
http.Handle("/upload", f.upload)
How should I wrap the content of code in the file struct method?