From 1f8659f9a344491d3ea4d9500b72dbe865b8eae2 Mon Sep 17 00:00:00 2001 From: "Matthew R. Miller" Date: Wed, 22 Nov 2017 15:53:05 -0700 Subject: [PATCH] fixes --- brconfig/env.go | 4 ++-- brconfig/env_test.go | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/brconfig/env.go b/brconfig/env.go index abc23a0..67d2626 100644 --- a/brconfig/env.go +++ b/brconfig/env.go @@ -3,10 +3,10 @@ package brconfig // Imports import ( + "github.com/mattrmiller/go-bedrock/brstrings" + "os" "strings" - - "github.com/mattrmiller/go-bedrock/brstrings" ) // Environment as string. diff --git a/brconfig/env_test.go b/brconfig/env_test.go index a454b3f..5c983ba 100644 --- a/brconfig/env_test.go +++ b/brconfig/env_test.go @@ -13,16 +13,16 @@ import ( func TestEnvValues(tst *testing.T) { // Set some values - os.Setenv("TEST_STRING_HELLO", "hello") - os.Setenv("TEST_BOOL_TRUE", "true") - os.Setenv("TEST_BOOL_FALSE", "false") - os.Setenv("TEST_BOOL_INVALID", "invalid value") - os.Setenv("TEST_FLOAT_1345", "1.345") - os.Setenv("TEST_FLOAT_INVALID", "invalid value") - os.Setenv("TEST_INT_80", "80") - os.Setenv("TEST_INT_INVALID", "invalid value") - os.Setenv("TEST_INT64_100", "100") - os.Setenv("TEST_INT64_INVALID", "invalid value") + _ = os.Setenv("TEST_STRING_HELLO", "hello") + _ = os.Setenv("TEST_BOOL_TRUE", "true") + _ = os.Setenv("TEST_BOOL_FALSE", "false") + _ = os.Setenv("TEST_BOOL_INVALID", "invalid value") + _ = os.Setenv("TEST_FLOAT_1345", "1.345") + _ = os.Setenv("TEST_FLOAT_INVALID", "invalid value") + _ = os.Setenv("TEST_INT_80", "80") + _ = os.Setenv("TEST_INT_INVALID", "invalid value") + _ = os.Setenv("TEST_INT64_100", "100") + _ = os.Setenv("TEST_INT64_INVALID", "invalid value") // Test string s := EnvAsString("TEST_STRING_HELLO")