This repository was archived by the owner on Sep 11, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 8
8
"gopkg.in/src-d/go-git.v4/storage/memory"
9
9
)
10
10
11
- // Retreive remote tags without cloning repository
11
+ // Retrieve remote tags without cloning repository
12
12
func main () {
13
13
14
14
// Create the remote with repository URL
@@ -19,13 +19,13 @@ func main() {
19
19
20
20
log .Print ("Fetching tags..." )
21
21
22
- // We can then use every Remote functions to retreive wanted informations
22
+ // We can then use every Remote functions to retrieve wanted informations
23
23
refs , err := rem .List (& git.ListOptions {})
24
24
if err != nil {
25
25
log .Fatal (err )
26
26
}
27
27
28
- // Filters the reference list and only keep tags
28
+ // Filters the references list and only keeps tags
29
29
var tags []string
30
30
for _ , ref := range refs {
31
31
if ref .Name ().IsTag () {
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ type Remote struct {
45
45
s storage.Storer
46
46
}
47
47
48
+ // NewRemote creates a new Remote.
49
+ // The intended purpose is to use the Remote for tasks such as listing remote references (like using git ls-remote).
50
+ // Otherwise Remotes should be created via the use of a Repository.
48
51
func NewRemote (s storage.Storer , c * config.RemoteConfig ) * Remote {
49
52
return & Remote {s : s , c : c }
50
53
}
You can’t perform that action at this time.
0 commit comments