Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(961)

Side by Side Diff: environs/storage.go

Issue 8545043: environs: extract tools package
Patch Set: environs: extract tools package Created 10 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « environs/openstack/local_test.go ('k') | environs/storage_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 package environs
2
3 import (
4 "fmt"
5 "io"
6 )
7
8 // EmptyStorage holds a StorageReader object that contains no files and
9 // offers no URLs.
10 var EmptyStorage StorageReader = emptyStorage{}
11
12 type emptyStorage struct{}
13
14 func (s emptyStorage) Get(name string) (io.ReadCloser, error) {
15 return nil, &NotFoundError{fmt.Errorf("file %q not found", name)}
16 }
17
18 func (s emptyStorage) URL(name string) (string, error) {
19 return "", fmt.Errorf("file %q not found", name)
20 }
21
22 func (s emptyStorage) List(prefix string) ([]string, error) {
23 return nil, nil
24 }
OLDNEW
« no previous file with comments | « environs/openstack/local_test.go ('k') | environs/storage_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b