MCPcopy
hub / github.com/davyxu/tabtoy / main

Function main

main.go:15–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13var enableProfile = false
14
15func main() {
16
17 flag.Parse()
18
19 // 版本
20 if *paramVersion {
21 build.Print()
22 return
23 }
24
25 switch *paramMode {
26 case "v3":
27
28 type stopper interface {
29 Stop()
30 }
31
32 var s stopper
33
34 if enableProfile {
35 s = profile.Start(profile.CPUProfile, profile.ProfilePath("."))
36 }
37
38 V3Entry()
39
40 if s != nil {
41 s.Stop()
42 }
43 case "exportorv2", "v2":
44 V2Entry()
45 case "v2tov3":
46 V2ToV3Entry()
47 default:
48 fmt.Println("--mode not specify")
49 os.Exit(1)
50 }
51
52}

Callers

nothing calls this directly

Calls 7

StopMethod · 0.95
V3EntryFunction · 0.85
V2EntryFunction · 0.85
V2ToV3EntryFunction · 0.85
StartMethod · 0.80
ParseMethod · 0.45
PrintMethod · 0.45

Tested by

no test coverage detected