Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'domain.go')
-rw-r--r--domain.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/domain.go b/domain.go
index 6e909ec7..9804321f 100644
--- a/domain.go
+++ b/domain.go
@@ -41,6 +41,18 @@ type domain struct {
Projects projects
}
+func (d *domain) String() string {
+ if d.Group != "" && d.ProjectName != "" {
+ return d.Group + "/" + d.ProjectName
+ }
+
+ if d.Group != "" {
+ return d.Group
+ }
+
+ return d.ProjectName
+}
+
func (l *locationDirectoryError) Error() string {
return "location error accessing directory where file expected"
}