Skip to content

Commit

Permalink
Merge pull request #15 from bobrik/prevent-nulls
Browse files Browse the repository at this point in the history
Prevent null instead of empty list for servers
  • Loading branch information
bobrik committed Jul 20, 2015
2 parents 6697848 + cadac93 commit e5732f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions marathon.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (m MarathonDiscoverer) apps() (Apps, error) {
app := apps[name]
if app.Name == "" {
app.Name = name
app.Servers = []Server{}
}

for _, task := range a.Tasks {
Expand Down
1 change: 1 addition & 0 deletions mesos.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func (m MesosDiscoverer) apps(tasks []refinedMesosTask) Apps {
app := apps[name]
if app.Name == "" {
app.Name = name
app.Servers = []Server{}
}

app.Servers = append(app.Servers, Server{
Expand Down

0 comments on commit e5732f3

Please sign in to comment.