From 16b11e443d4984e010b85f4a7356c77fd9af7652 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Sat, 10 Oct 2015 15:17:25 -0700 Subject: [PATCH] go fmt the "compact" function changes. --- config/interpolate_funcs.go | 22 +++++++++++----------- config/interpolate_funcs_test.go | 1 - config/string_list.go | 4 ++-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/config/interpolate_funcs.go b/config/interpolate_funcs.go index 992171914..5322e46c4 100644 --- a/config/interpolate_funcs.go +++ b/config/interpolate_funcs.go @@ -20,17 +20,17 @@ var Funcs map[string]ast.Function func init() { Funcs = map[string]ast.Function{ - "compact": interpolationFuncCompact(), - "concat": interpolationFuncConcat(), - "element": interpolationFuncElement(), - "file": interpolationFuncFile(), - "format": interpolationFuncFormat(), - "formatlist": interpolationFuncFormatList(), - "index": interpolationFuncIndex(), - "join": interpolationFuncJoin(), - "length": interpolationFuncLength(), - "replace": interpolationFuncReplace(), - "split": interpolationFuncSplit(), + "compact": interpolationFuncCompact(), + "concat": interpolationFuncConcat(), + "element": interpolationFuncElement(), + "file": interpolationFuncFile(), + "format": interpolationFuncFormat(), + "formatlist": interpolationFuncFormatList(), + "index": interpolationFuncIndex(), + "join": interpolationFuncJoin(), + "length": interpolationFuncLength(), + "replace": interpolationFuncReplace(), + "split": interpolationFuncSplit(), "base64encode": interpolationFuncBase64Encode(), "base64decode": interpolationFuncBase64Decode(), } diff --git a/config/interpolate_funcs_test.go b/config/interpolate_funcs_test.go index 8a33169a6..561e1176b 100644 --- a/config/interpolate_funcs_test.go +++ b/config/interpolate_funcs_test.go @@ -11,7 +11,6 @@ import ( "github.com/hashicorp/terraform/config/lang/ast" ) - func TestInterpolateFuncCompact(t *testing.T) { testFunction(t, testFunctionConfig{ Cases: []testFunctionCase{ diff --git a/config/string_list.go b/config/string_list.go index ba41d0256..e3caea70b 100644 --- a/config/string_list.go +++ b/config/string_list.go @@ -28,11 +28,11 @@ const stringListDelim = `B780FFEC-B661-4EB8-9236-A01737AD98B6` func (sl StringList) Compact() StringList { parts := sl.Slice() - newlist := []string{} + newlist := []string{} // drop the empty strings for i := range parts { if parts[i] != "" { - newlist = append(newlist, parts[i]) + newlist = append(newlist, parts[i]) } } return NewStringList(newlist)