Skip to content

Commit

Permalink
go fmt the "compact" function changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
apparentlymart committed Oct 10, 2015
1 parent 3040d84 commit 16b11e4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
22 changes: 11 additions & 11 deletions config/interpolate_funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down
1 change: 0 additions & 1 deletion config/interpolate_funcs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/hashicorp/terraform/config/lang/ast"
)


func TestInterpolateFuncCompact(t *testing.T) {
testFunction(t, testFunctionConfig{
Cases: []testFunctionCase{
Expand Down
4 changes: 2 additions & 2 deletions config/string_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 16b11e4

Please sign in to comment.