func (s *S3Store) Has(key string) (bool, error) { url := s.Url(key) rc, err := s3util.Open(url, s.config) if err == nil { rc.Close() return true, nil } if strings.Contains(err.Error(), "unwanted http status 404:") { return false, nil } return false, err }
func (s *S3Store) Get(key string) (io.ReadCloser, error) { url := s.Url(key) return s3util.Open(url, s.config) }
func open(s string) (io.ReadCloser, error) { if isURL(s) { return s3util.Open(s, nil) } return os.Open(s) }