From 010a2c6b58feaf89841c3ff4010ed37d679b370e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 30 Dec 2024 04:41:13 -0600 Subject: [PATCH] shortcut functions to see what branch is checked out --- common.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common.go b/common.go index fb17679..a9bc736 100644 --- a/common.go +++ b/common.go @@ -32,3 +32,17 @@ func (repo *Repo) SetGoPrimitive(b bool) { } repo.GoInfo.GoPrimitive = b } + +func (repo *Repo) IsUserBranch() bool { + if repo.GetCurrentBranchName() == repo.GetUserBranchName() { + return true + } + return false +} + +func (repo *Repo) IsMasterBranch() bool { + if repo.GetCurrentBranchName() == repo.GetMasterBranchName() { + return true + } + return false +}