Skip to content

Commit e4abe62

Browse files
author
Vaughn Dice
authored
Merge pull request #107 from vdice/remove-label-string-logic
ref(api/appsettings.go): remove label string method
2 parents 685c7f7 + a193087 commit e4abe62

2 files changed

Lines changed: 0 additions & 26 deletions

File tree

api/appsettings.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package api
22

33
import (
44
"bytes"
5-
"fmt"
65
"text/template"
76
)
87

@@ -66,14 +65,3 @@ type Autoscale struct {
6665

6766
// Labels can contain any user-defined key value
6867
type Labels map[string]interface{}
69-
70-
func (l Labels) String() string {
71-
var buffer bytes.Buffer
72-
for k, v := range l {
73-
if buffer.Len() > 0 {
74-
buffer.WriteString("\n")
75-
}
76-
buffer.WriteString(fmt.Sprintf("%-16s %s", k+":", v))
77-
}
78-
return buffer.String()
79-
}

api/appsettings_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,3 @@ CPU: 40%`)
3030
t.Errorf("Expected:\n\n%s\n\nGot:\n\n%s", expected2, a2.String())
3131
}
3232
}
33-
34-
func TestLabelsString(t *testing.T) {
35-
data := Labels{
36-
"git_repo": "https://github.com/deis/controller-sdk-go",
37-
"team": "deis",
38-
}
39-
40-
expected := strings.TrimSpace(`git_repo: https://github.com/deis/controller-sdk-go
41-
team: deis`)
42-
43-
if strings.TrimSpace(data.String()) != expected {
44-
t.Errorf("Expected:\n\n%s\n\nGot:\n\n%s", expected, data.String())
45-
}
46-
}

0 commit comments

Comments
 (0)