@@ -132,7 +132,7 @@ func (s *RepositoriesService) DownloadContents(ctx context.Context, owner, repo,
132
132
for _ , contents := range dirContents {
133
133
if * contents .Name == filename {
134
134
if contents .DownloadURL == nil || * contents .DownloadURL == "" {
135
- return nil , resp , fmt .Errorf ("No download link found for %s" , filepath )
135
+ return nil , resp , fmt .Errorf ("no download link found for %s" , filepath )
136
136
}
137
137
dlResp , err := s .client .client .Get (* contents .DownloadURL )
138
138
if err != nil {
@@ -141,7 +141,7 @@ func (s *RepositoriesService) DownloadContents(ctx context.Context, owner, repo,
141
141
return dlResp .Body , & Response {Response : dlResp }, nil
142
142
}
143
143
}
144
- return nil , resp , fmt .Errorf ("No file named %s found in %s" , filename , dir )
144
+ return nil , resp , fmt .Errorf ("no file named %s found in %s" , filename , dir )
145
145
}
146
146
147
147
// DownloadContentsWithMeta is identical to DownloadContents but additionally
@@ -162,7 +162,7 @@ func (s *RepositoriesService) DownloadContentsWithMeta(ctx context.Context, owne
162
162
for _ , contents := range dirContents {
163
163
if * contents .Name == filename {
164
164
if contents .DownloadURL == nil || * contents .DownloadURL == "" {
165
- return nil , contents , resp , fmt .Errorf ("No download link found for %s" , filepath )
165
+ return nil , contents , resp , fmt .Errorf ("no download link found for %s" , filepath )
166
166
}
167
167
dlResp , err := s .client .client .Get (* contents .DownloadURL )
168
168
if err != nil {
@@ -171,7 +171,7 @@ func (s *RepositoriesService) DownloadContentsWithMeta(ctx context.Context, owne
171
171
return dlResp .Body , contents , & Response {Response : dlResp }, nil
172
172
}
173
173
}
174
- return nil , nil , resp , fmt .Errorf ("No file named %s found in %s" , filename , dir )
174
+ return nil , nil , resp , fmt .Errorf ("no file named %s found in %s" , filename , dir )
175
175
}
176
176
177
177
// GetContents can return either the metadata and content of a single file
0 commit comments