Recursive find respository

Why not `Open repository, walking up from given directory to find root` for default in golang? 
Could be better create other function?