File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -59,12 +59,17 @@ func initialModel() model {
59
59
60
60
// get first and second result into separate variables
61
61
// 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
65
68
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
+ }
68
73
69
74
m := model {
70
75
inputs : make ([]textinput.Model , 2 ),
You can’t perform that action at this time.
0 commit comments