Read window logs in Golang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "log" | |
| "github.com/libgit2/git2go" | |
| ) | |
| func mergeBranches(repo *git.Repository, sourceBranchName string, destinationBranchName string) error { | |
| // Assuming that these two branches are local already | |
| sourceBranch, err := repo.LookupBranch(sourceBranchName, git.BranchLocal) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "errors" | |
| "log" | |
| "github.com/libgit2/git2go" | |
| ) | |
| func checkoutBranch(repo *git.Repository, branchName string) error { | |
| checkoutOpts := &git.CheckoutOpts{ |