github.com/gitbundle/modules@v0.0.0-20231025071548-85b91c5c3b01/git/repo_blob.go (about) 1 // Copyright 2023 The GitBundle Inc. All rights reserved. 2 // Copyright 2017 The Gitea Authors. All rights reserved. 3 // Use of this source code is governed by a MIT-style 4 // license that can be found in the LICENSE file. 5 6 package git 7 8 // GetBlob finds the blob object in the repository. 9 func (repo *Repository) GetBlob(idStr string) (*Blob, error) { 10 id, err := NewIDFromString(idStr) 11 if err != nil { 12 return nil, err 13 } 14 return repo.getBlob(id) 15 }