Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Fix #2 by getting rid of afero library for reading files
Browse files Browse the repository at this point in the history
  • Loading branch information
karuppiah7890 committed Aug 25, 2020
1 parent c20b894 commit de76b26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package cmd

import (
"fmt"
"io/ioutil"
"os"

"github.com/karuppiah7890/go-jsonschema-generator"
"github.com/spf13/afero"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
"os"
)

// rootCmd represents the base command when called without any subcommands
Expand All @@ -29,9 +30,8 @@ Examples:
}

valuesFilePath := args[0]
fs := afero.NewOsFs()
values := make(map[string]interface{})
valuesFileData, err := afero.ReadFile(fs, valuesFilePath)
valuesFileData, err := ioutil.ReadFile(valuesFilePath)
if err != nil {
return fmt.Errorf("error when reading file '%s': %v", valuesFilePath, err)
}
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.13

require (
github.com/karuppiah7890/go-jsonschema-generator v0.0.0-20191229070329-082ad3307d9e
github.com/spf13/afero v1.1.2
github.com/spf13/cobra v0.0.5
github.com/spf13/pflag v1.0.5 // indirect
gopkg.in/yaml.v2 v2.2.7
Expand Down

0 comments on commit de76b26

Please sign in to comment.