Skip to content

Commit

Permalink
fixing implementation of configstring List String() ; fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmin Rentea committed Apr 5, 2017
1 parent d4e743c commit 1ea9346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func assertArguments(a *assert.Assertions) {
a.Equal("dev", *Config.EnvName)
a.Equal("mem", *Config.Profile)

a.Equal("[ 127.0.0.1:9092 127.0.0.1:9091]", (*Config.KafkaProducer.Brokers).String())
a.Equal("[127.0.0.1:9092 127.0.0.1:9091]", (*Config.KafkaProducer.Brokers).String())
a.Equal("sms_reporting_topic", *Config.SMS.KafkaReportingTopic)

assertClusterRemotes(a)
Expand Down
8 changes: 6 additions & 2 deletions server/configstring/configstringlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ func (sl *List) IsEmpty() bool {

func (sl List) String() string {
res := "["
for _, s := range sl {
res = res + " " + s
for i, s := range sl {
if i == 0 {
res = res + s
} else {
res = res + " " + s
}
}
res = res + "]"
return res
Expand Down

0 comments on commit 1ea9346

Please sign in to comment.