github.com/abhinav/git-fu@v0.6.1-0.20171029234004-54218d68c11b/repo/repo.go (about)

     1  package repo
     2  
     3  import "fmt"
     4  
     5  // Repo uniquely identifies a GitHub repository.
     6  type Repo struct {
     7  	Owner string
     8  	Name  string
     9  }
    10  
    11  func (r *Repo) String() string {
    12  	if r.Owner == "" && r.Name == "" {
    13  		return ""
    14  	}
    15  	return fmt.Sprintf("%v/%v", r.Owner, r.Name)
    16  }