I think you can use os.Stat to check the config file exists, it should also return whether or not it's a directory (http://golang.org/pkg/os/#Stat). That way you could switch between reading a file and a directory. I would write a patch, but this is the first time I've read Go