mirror of
https://github.com/joho/godotenv.git
synced 2025-07-08 17:54:04 +00:00
Remove commented out code and go fmt tests.
This commit is contained in:
@ -88,8 +88,6 @@ func loadFile(filename string) (err error) {
|
|||||||
|
|
||||||
func readFile(filename string) (envMap map[string]string, err error) {
|
func readFile(filename string) (envMap map[string]string, err error) {
|
||||||
file, err := os.Open(filename)
|
file, err := os.Open(filename)
|
||||||
|
|
||||||
// content, err := ioutil.ReadFile(filename)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ func loadEnvAndCompareValues(t *testing.T, envFileName string, expectedValues ma
|
|||||||
func TestLoadWithNoArgsLoadsDotEnv(t *testing.T) {
|
func TestLoadWithNoArgsLoadsDotEnv(t *testing.T) {
|
||||||
err := Load()
|
err := Load()
|
||||||
pathError := err.(*os.PathError)
|
pathError := err.(*os.PathError)
|
||||||
if pathError == nil || pathError.Op != "open" || pathError.Path != ".env"{
|
if pathError == nil || pathError.Op != "open" || pathError.Path != ".env" {
|
||||||
t.Errorf("Didn't try and open .env by default")
|
t.Errorf("Didn't try and open .env by default")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user