Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
kkga committed Sep 16, 2021
1 parent dffa368 commit 0cb2cea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kak/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Start(name string) (sessionName string, err error) {
}

func waitForSession(ch chan bool, name string) error {
out:
Out:
for {
sessions, err := Sessions()
if err != nil {
Expand All @@ -44,7 +44,7 @@ out:
for _, s := range sessions {
if s.Name == name {
ch <- true
break out
break Out

}
}
Expand All @@ -63,15 +63,15 @@ func uniqName() (name string, err error) {
if err != nil {
return "", err
}
out:
Out:
for {
rand := fmt.Sprintf("kks-%d", rand.Intn(999-100)+100)
for i, s := range sessions {
if s == rand {
break
} else if i == len(sessions)-1 {
name = rand
break out
break Out
}
}
}
Expand Down

0 comments on commit 0cb2cea

Please sign in to comment.