I would like to know how http,FileServer(), http.Dir() & http.StripPrefix() work. Detailed and with examples please. I searched about them but I really couldn’t understood how they actually work.
I couldn’t understood why http.Dir() is for. Just for converting the path from string to dir struct(?) or spesific variable type? Also I would like to know what’s the difference between them and how should I write a path:
Why I can’t use http,FileServer() like in the example below, why should I use http.Dir()?:
I really couldn’t understood much about strip prefix function so if someone could help me I would really appreciate it.
Thanks in advance, have a nice day