-
Notifications
You must be signed in to change notification settings - Fork 0
/
third.go
56 lines (53 loc) · 1.09 KB
/
third.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"fmt"
// "golang/demo"
"golang/funcs"
"golang/chans"
)
func third_menu() {
fmt.Println("---------------------- ")
fmt.Println(" THIRD ")
fmt.Println("---------------------- ")
fmt.Println("I = Interfsces")
fmt.Println("S = String functions")
fmt.Println("C = Channels")
fmt.Println("B = Buffered channel")
fmt.Println("W = Wait for goroutine")
fmt.Println("E = Select channels")
fmt.Println("N = Closing channels")
fmt.Println("---------------------- ")
fmt.Println("ENTER => main menu")
//main menu is in main.go
}
func third() {
var option = "_"
clear()
third_menu()
for option != "Q" {
fmt.Print(">>")
fmt.Scanf("%s", &option)
switch option {
case "0":
clear()
case "I":
funcs.TestInterface()
case "S":
funcs.TestString()
case "C":
chans.TestChannels()
case "B":
chans.TestBuffer()
case "E":
chans.TestSelect()
case "W":
chans.ChanSync()
case "N":
chans.Closing()
default:
clear(); print_menu()
return
} //switch
option = "_"
} // for
} // func