Add SetUri to Repository

This commit is contained in:
Ettore Di Giacinto
2019-11-25 20:02:59 +01:00
parent f3ba014593
commit 820a157698
2 changed files with 6 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ type Repositories []Repository
type Repository interface {
GetName() string
GetUri() string
SetUri(string)
GetPriority() int
GetIndex() compiler.ArtifactIndex
GetTree() tree.Builder

View File

@@ -19,6 +19,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
@@ -145,6 +146,9 @@ func (r *LuetRepository) SetType(p string) {
r.Type = p
}
func (r *LuetRepository) SetUri(p string) {
r.Uri = p
}
func (r *LuetRepository) GetUri() string {
return r.Uri
}
@@ -247,6 +251,7 @@ func (r *LuetRepository) Sync() (Repository, error) {
}
repo.SetTree(reciper)
repo.SetTreePath(treefs)
repo.SetUri(r.GetUri())
return repo, nil
}