-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefs.go
More file actions
51 lines (40 loc) · 760 Bytes
/
Copy pathrefs.go
File metadata and controls
51 lines (40 loc) · 760 Bytes
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
package simver
type RefProvider interface {
Head() string
Base() string
Root() string
Merge() string
}
type BasicRefProvider struct {
HeadRef string
BaseRef string
RootRef string
MergeRef string
}
func (e *BasicRefProvider) Head() string {
return e.HeadRef
}
func (e *BasicRefProvider) Base() string {
return e.BaseRef
}
func (e *BasicRefProvider) Root() string {
return e.RootRef
}
func (e *BasicRefProvider) Merge() string {
return e.MergeRef
}
type SingleRefProvider struct {
Ref string
}
func (e *SingleRefProvider) Head() string {
return e.Ref
}
func (e *SingleRefProvider) Base() string {
return e.Ref
}
func (e *SingleRefProvider) Root() string {
return e.Ref
}
func (e *SingleRefProvider) Merge() string {
return e.Ref
}