mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-05-16 09:48:37 +02:00
d0ed65e0fd
Add some tests for RemoteLoader while we're at it; we didn't have any.
28 lines
491 B
Go
28 lines
491 B
Go
package models
|
|
|
|
// Remote : A git remote
|
|
type Remote struct {
|
|
Name string
|
|
Urls []string
|
|
// PushUrls is empty unless the remote has explicit `remote.<name>.pushurl`
|
|
// entries; when empty, pushes go to Urls.
|
|
PushUrls []string
|
|
Branches []*RemoteBranch
|
|
}
|
|
|
|
func (r *Remote) RefName() string {
|
|
return r.Name
|
|
}
|
|
|
|
func (r *Remote) ID() string {
|
|
return r.RefName()
|
|
}
|
|
|
|
func (r *Remote) URN() string {
|
|
return "remote-" + r.ID()
|
|
}
|
|
|
|
func (r *Remote) Description() string {
|
|
return r.RefName()
|
|
}
|