Skip to content

Commit 1ff0ac7

Browse files
committed
fdsaf
1 parent 968246f commit 1ff0ac7

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

cmd/commit/main.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,17 @@ func initialModel() model {
5959

6060
// get first and second result into separate variables
6161
// check if result has more than 2 items
62-
if len(result) <= 2 {
63-
log.Fatal("Branch name should be in the format of <type>/<task-id>/short-message")
64-
}
62+
//if len(result) <= 2 {
63+
// log.Fatal("Branch name should be in the format of <type>/<task-id>/short-message")
64+
//}
65+
66+
var branchType string
67+
var ticketId string
6568

66-
branchType := strings.ToUpper(result[0])
67-
ticketId := strings.ToUpper(result[1])
69+
if len(result) >= 2 {
70+
branchType = strings.ToUpper(result[0])
71+
ticketId = strings.ToUpper(result[1])
72+
}
6873

6974
m := model{
7075
inputs: make([]textinput.Model, 2),

0 commit comments

Comments
 (0)