Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Maldris
Copy link

@Maldris Maldris commented Aug 9, 2016

existing static directories string is now tokenized and caches in a slice and serving static files iterates over this slice to find the directory.
If it is unable to find the file if fails over the the default static directories rather than failing outright (old behavior).
This is useful when trying to serve vendor files from a package manager (i.e. npm) as I didnt wish to move my static files into "node_modules"

Scott Owens added 2 commits August 9, 2016 12:16
…und.

added support for multiple custom defined static directories,
  both in the existing string format (so as not to be breaking to existing uses)
  and through a new string array that caches the list
@Maldris
Copy link
Author

Maldris commented Aug 9, 2016

realised I forgot to push the fixed version, pardon me. Ill correct that

@Maldris
Copy link
Author

Maldris commented Aug 9, 2016

forgot to call gofmt, apologies, it appears to be a forgetful day today.

@hoisie
Copy link
Owner

hoisie commented Aug 9, 2016

Out of curiosity, could you achieve the same thing using symbolic links in the filesystem?

@Maldris
Copy link
Author

Maldris commented Aug 9, 2016

most likely, yes.
But this project is annoying and one of the bosses insists on running one of the servers on windows, and that's just not worth the effort, this change was faster and easier for us to maintain than screwing around with the file directory structure in windows, far to easy to screw up and cause larger problems.
If you'd rather not merge these changes that's file, Ill keep the fork around in the event its useful to someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants