Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
unshadowing nested err
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Simmons <[email protected]>
  • Loading branch information
Panagiotis Xynos authored and crsimmons committed Jan 14, 2019
1 parent 54bbef7 commit 754f576
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions concourse/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func (client *Client) FetchInfo() (*Info, error) {

var certExpiry string
if len(directorCredsBytes) > 0 {
natsCA, err := yaml.Path(directorCredsBytes, "nats_server_tls/ca")
if err != nil {
return nil, err
natsCA, err1 := yaml.Path(directorCredsBytes, "nats_server_tls/ca")
if err1 != nil {
return nil, err1
}

var re = regexp.MustCompile(`\n\s*`)
Expand All @@ -57,9 +57,9 @@ func (client *Client) FetchInfo() (*Info, error) {
openSSL.Stdin = strings.NewReader(re.ReplaceAllString(natsCA, "\n"))
var out bytes.Buffer
openSSL.Stdout = &out
err = openSSL.Run()
if err != nil {
return nil, err
err1 = openSSL.Run()
if err1 != nil {
return nil, err1
}
if strings.Contains(out.String(), "notAfter=") {
certExpiry = strings.Split(out.String(), "notAfter=")[1]
Expand Down

0 comments on commit 754f576

Please sign in to comment.