internal/filetypes: not a file extension if the file starts with a dot
We'd like to be able to read directories that start with a dot.
Currently the filetypes logic doesn't accept that because `filepath.Ext`
returns the part of the file after the dot even if the dot is at
the start of the file.
Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I032c77223575cd1dcb6295a3a16d2ca75a43f205
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/542990
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>