Skip to content

Commit

Permalink
Fixing lint errors.
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Souza <[email protected]>
  • Loading branch information
artursouza committed Apr 19, 2023
1 parent 5905d0e commit 57b2731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/components/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ limitations under the License.
package components

import (
"io/ioutil"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -182,7 +181,7 @@ func (c *components) getDockerComposeComponents(scope string) []Component {
if info.IsDir() && info.Name() != filepath.Base(componentsDirectory) {
return filepath.SkipDir
} else if !info.IsDir() && filepath.Ext(path) == ".yaml" {
content, err := ioutil.ReadFile(path)
content, err := os.ReadFile(path)
if err != nil {
log.Printf("Failure reading file %s: %v\n", path, err)
return err
Expand Down
4 changes: 4 additions & 0 deletions pkg/instances/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ func (i *instances) GetMetadata(scope string, id string) MetadataOutput {

func (i *instances) getMetadataOutputFromURLs(primaryURL string, secondaryURL string) MetadataOutput {
req, err := http.NewRequest("GET", primaryURL, nil)
if err != nil {
log.Println(err)
return MetadataOutput{}
}

if len(i.daprApiToken) > 0 {
req.Header.Add("dapr-api-token", i.daprApiToken)
Expand Down

0 comments on commit 57b2731

Please sign in to comment.