Looking for hints about how to direct my research. I have a Go application that takes a directory in the form of the io package's fs.FS as its input. However the directory it needs is actually stored in a remote git repo (Github or Gitlab).
I'm trying to figure out how to convert the git repo address and directory path into a fs.FS
that I can feed my application. I have just come across the go-git package and that looks promising. Intuitively though, it seems like a git clone
would be pulling way too much info if I want only one directory, and I know the branch name (main
) I'm interested in.
I'd appreciate pointers on how to do this, even at a high level.