I'm working in an application that generates files, and I would like to push those files to a github repo. Is that possible to do from within the app?
Try the package go-git. It allows you to perform git clone/commit/push operations. It can clone a tree in-memory too without requiring disk access.
From the the commit example is a sample add/commit:
_, err = w.Add("example-git-file")
CheckIfError(err)
commit, err := w.Commit("example go-git commit", &git.CommitOptions{
Author: &object.Signature{
Name: "John Doe",
Email: "john@doe.org",
When: time.Now(),
},
})