mirror of
https://github.com/jimeh/build-emacs-for-macos.git
synced 2026-02-19 09:36:42 +00:00
22 lines
297 B
Go
22 lines
297 B
Go
package main
|
|
|
|
import "strings"
|
|
|
|
type Repo struct {
|
|
Owner string
|
|
Name string
|
|
}
|
|
|
|
func NewRepo(ownerAndRepo string) *Repo {
|
|
parts := strings.SplitN(ownerAndRepo, "/", 2)
|
|
|
|
return &Repo{
|
|
Owner: parts[0],
|
|
Name: parts[1],
|
|
}
|
|
}
|
|
|
|
func (s *Repo) String() string {
|
|
return s.Owner + "/" + s.Name
|
|
}
|