code.gitea.io/gitea@v1.19.3/modules/git/repo_blob.go (about) 1 // Copyright 2020 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package git 5 6 // GetBlob finds the blob object in the repository. 7 func (repo *Repository) GetBlob(idStr string) (*Blob, error) { 8 id, err := NewIDFromString(idStr) 9 if err != nil { 10 return nil, err 11 } 12 return repo.getBlob(id) 13 }