github.com/creativeprojects/go-selfupdate@v1.2.0/repository_id.go (about) 1 package selfupdate 2 3 type RepositoryID int 4 5 // Repository interface 6 var _ Repository = RepositoryID(0) 7 8 // NewRepositoryID creates a repository ID from an integer 9 func NewRepositoryID(id int) RepositoryID { 10 return RepositoryID(id) 11 } 12 13 func (r RepositoryID) GetSlug() (string, string, error) { 14 return "", "", ErrInvalidID 15 } 16 17 func (r RepositoryID) Get() (interface{}, error) { 18 return int(r), nil 19 }