(e Engine, id int64)
| 1793 | } |
| 1794 | |
| 1795 | func getRepositoryByID(e Engine, id int64) (*Repository, error) { |
| 1796 | repo := new(Repository) |
| 1797 | has, err := e.ID(id).Get(repo) |
| 1798 | if err != nil { |
| 1799 | return nil, err |
| 1800 | } else if !has { |
| 1801 | return nil, ErrRepoNotExist{args: map[string]any{"repoID": id}} |
| 1802 | } |
| 1803 | return repo, repo.loadAttributes(e) |
| 1804 | } |
| 1805 | |
| 1806 | // GetRepositoryByID returns the repository by given id if exists. |
| 1807 | func GetRepositoryByID(id int64) (*Repository, error) { |
no test coverage detected