Skip to content

Commit

Permalink
renamted Credential to Credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
adranwit committed Mar 20, 2018
1 parent 3c1708a commit 21e0863
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion secret/service.go
Expand Up @@ -80,7 +80,7 @@ func (s *Service) GetOrCreate(secret string) (*cred.Config, error) {
return result, err
}

//Credential returns credential config
//Credentials returns credential config
func (s *Service) GetCredentials(secret string) (*cred.Config, error) {
if !Secret(secret).IsLocation() {
var result = &cred.Config{Data: string(secret)}
Expand Down
1 change: 0 additions & 1 deletion ssh/session.go
Expand Up @@ -353,7 +353,6 @@ func (s *multiCommandSession) shellInit() (err error) {
return err
}
if strings.Contains(s.shellPrompt, ts+"$") {
fmt.Printf("has shell %v\n", i)
break
}
}
Expand Down
1 change: 1 addition & 0 deletions uri.go
Expand Up @@ -98,6 +98,7 @@ func URLPathJoin(baseURL, path string) string {
if strings.HasPrefix(path, "/") {
return URLStripPath(baseURL) + path
}

if !strings.HasSuffix(baseURL, "/") {
baseURL += "/"
}
Expand Down
14 changes: 7 additions & 7 deletions url/resource.go
Expand Up @@ -17,10 +17,10 @@ import (
//Resource represents a URL based resource, with enriched meta info
type Resource struct {
URL string `description:"resource URL or relative or absolute path" required:"true"` //URL of resource
Credential string `description:"credentials file"` //name of credential file or credential key depending on implementation
Credentials string `description:"credentials file"` //name of credential file or credential key depending on implementation
ParsedURL *url.URL `json:"-"` //parsed URL resource
Cache string `description:"local cache path"` //Cache path for the resource, if specified resource will be cached in the specified path
CacheExpiryMs int //CacheExpiryMs expiry time in ms
CacheExpiryMs int //CacheExpiryMs expiry time in ms
modificationTag int64
init bool
}
Expand All @@ -30,7 +30,7 @@ func (r *Resource) Clone() *Resource {
return &Resource{
init: r.init,
URL: r.URL,
Credential: r.Credential,
Credentials: r.Credentials,
ParsedURL: r.ParsedURL,
Cache: r.Cache,
CacheExpiryMs: r.CacheExpiryMs,
Expand Down Expand Up @@ -110,7 +110,7 @@ func (r *Resource) Download() ([]byte, error) {
return content, nil
}
}
service, err := storage.NewServiceForURL(r.URL, r.Credential)
service, err := storage.NewServiceForURL(r.URL, r.Credentials)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -227,7 +227,7 @@ func (r *Resource) Cachable() bool {
}

func computeResourceModificationTag(resource *Resource) (int64, error) {
service, err := storage.NewServiceForURL(resource.URL, resource.Credential)
service, err := storage.NewServiceForURL(resource.URL, resource.Credentials)
if err != nil {
return 0, err
}
Expand All @@ -250,7 +250,7 @@ func computeResourceModificationTag(resource *Resource) (int64, error) {
if objectResource.ParsedURL.Path == resource.ParsedURL.Path {
continue
}
modificationTag, err := computeResourceModificationTag(NewResource(object.URL(), resource.Credential))
modificationTag, err := computeResourceModificationTag(NewResource(object.URL(), resource.Credentials))
if err != nil {
return 0, err
}
Expand Down Expand Up @@ -332,7 +332,7 @@ func NewResource(Params ...interface{}) *Resource {
init: true,
ParsedURL: parsedURL,
URL: URL,
Credential: credential,
Credentials: credential,
Cache: cache,
CacheExpiryMs: cacheExpiryMs,
}
Expand Down

0 comments on commit 21e0863

Please sign in to comment.