Currently, the LoadCCache() function does not check the length of the credentials cache file. This causes a panic in Unmarshal()
when parsing a short ccache file like, e.g., an empty file.
LoadCCache() already handles file reading errors returned by os.ReadFile(). So, it could be useful to also check a minimum ccache file length and return an error in case of a short file to avoid the panic. I'll open a PR with a suggestion. I hope, that's OK :)
Currently, the LoadCCache() function does not check the length of the credentials cache file. This causes a panic in Unmarshal() when parsing a short ccache file like, e.g., an empty file.
LoadCCache() already handles file reading errors returned by os.ReadFile(). So, it could be useful to also check a minimum ccache file length and return an error in case of a short file to avoid the panic. I'll open a PR with a suggestion. I hope, that's OK :)