jesseduffield.lazygit/pkg/gui/presentation/ref_operations.go
Jesse Duffield b726fd44e7 Use universal resource names to identify items
Refactoring the code to allow for any list item, not just branches/tags, to have an
inline status.
2023-10-02 11:44:51 +11:00

24 lines
565 B
Go

package presentation
import (
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/i18n"
)
func refOperationToString(refOperation types.ItemOperation, tr *i18n.TranslationSet) string {
switch refOperation {
case types.ItemOperationNone:
return ""
case types.ItemOperationPushing:
return tr.PushingStatus
case types.ItemOperationPulling:
return tr.PullingStatus
case types.ItemOperationFastForwarding:
return tr.FastForwardingOperation
case types.ItemOperationDeleting:
return tr.DeletingStatus
}
return ""
}