Skip to content

Commit

Permalink
Fix: endpoints file env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kavya498 committed Oct 5, 2021
1 parent 8591192 commit e1db057
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion endpoints/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type endpointLocator struct {
//NewEndpointLocator ...
func NewEndpointLocator(region, visibility, file string) EndpointLocator {
var fileMap map[string]interface{}
if f := helpers.EnvFallBack([]string{"IBMCLOUD_ENDPOINTS_FILE", "IC_ENDPOINTS_FILE"}, file); f != "" {
if f := helpers.EnvFallBack([]string{"IBMCLOUD_ENDPOINTS_FILE_PATH", "IC_ENDPOINTS_FILE_PATH"}, file); f != "" {
jsonFile, err := os.Open(f)
if err != nil {
log.Fatalf("Unable to open endpoints file %s", err)
Expand Down
2 changes: 1 addition & 1 deletion session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func New(configs ...*bluemix.Config) (*Session, error) {
c.Visibility = helpers.EnvFallBack([]string{"IC_VISIBILITY", "IBMCLOUD_VISIBILITY"}, "public")
}
if len(c.EndpointsFile) == 0 {
c.EndpointsFile = helpers.EnvFallBack([]string{"IC_ENDPOINTS_FILE", "IBMCLOUD_ENDPOINTS_FILE"}, "")
c.EndpointsFile = helpers.EnvFallBack([]string{"IC_ENDPOINTS_FILE_PATH", "IBMCLOUD_ENDPOINTS_FILE_PATH"}, "")
}
if c.RetryDelay == nil {
c.RetryDelay = helpers.Duration(30 * time.Second)
Expand Down

0 comments on commit e1db057

Please sign in to comment.