馃嵃 Personal Multi-Git Remote Manager
go
git
1package remote
2
3type Operation int
4
5const (
6 Pull Operation = iota
7 Push
8 Fetch
9)
10
11func (o Operation) String() string {
12 switch o {
13 case Pull:
14 return "pull"
15 case Push:
16 return "push"
17 case Fetch:
18 return "fetch"
19 default:
20 return "unknown"
21 }
22}
23
24func (o Operation) Verb() string {
25 switch o {
26 case Pull:
27 return "Pulling"
28 case Push:
29 return "Pushing"
30 case Fetch:
31 return "Fetching"
32 default:
33 return "Operating"
34 }
35}
36
37func (o Operation) PastTense() string {
38 switch o {
39 case Pull:
40 return "Pulled"
41 case Push:
42 return "Pushed"
43 case Fetch:
44 return "Fetched"
45 default:
46 return "Completed"
47 }
48}
49
50const All = "all"